What is the time complexity of binary search on a sorted array?
- AO(n log n)
- BO(1)
- CO(n)
- DO(log n)
What is the time complexity of binary search on a sorted array?
What is the running time of counting sort for n integers in the range 0 to k?
An algorithm with two nested loops, each running n times, typically has which complexity?
The lower bound for comparison-based sorting in the worst case is:
What is the time complexity of: for i = 1 to n: for j = 1 to i: do O(1) work?
Is it correct to say that an O(n²) algorithm is also O(n³)?
Which technique gives an expected O(n log n) running time for quicksort on any input?
The Held–Karp dynamic programming algorithm solves the travelling salesman problem exactly. What is its running time for n cities?
Full step-by-step solutions: practise this topic on examproblems.com.