Analysis of Algorithms UPDATED Exam Questions and CORRECT Answers
True/False: Is 2^(n+1) = O(2^n) ? - False 3^n + 12 - O(2^n) What is the Asymptotic complexity of a binary search given the code below and the following recursion equation: T(n) = T(n/2) + 1 // initially called with low = 0, high = N - 1 BinarySearch_Right(A[0..N-1], value, low, high) { // invariants: value = A[i] for all i low value A[i] for all i high if (high low) return low mid = (low + high) / 2
Written for
- Institution
- Analysis of Algorithms
- Course
- Analysis of Algorithms
Document information
- Uploaded on
- May 13, 2024
- Number of pages
- 13
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
analysis of algorithms
-
algorithms