An O(n²) algorithm takes 1 second for n = 1000. About how long does it take for n = 2000?
- A8 seconds
- B2 seconds
- C1 second
- D4 seconds
An O(n²) algorithm takes 1 second for n = 1000. About how long does it take for n = 2000?
What is the worst-case time complexity of merge sort?
An algorithm with two nested loops, each running n times, typically has which complexity?
A recurrence T(n) = 2T(n/2) + O(n) solves to:
What does the recurrence T(n) = T(n − 1) + O(n) solve to?
What is the time complexity of the standard dynamic programming algorithm for the longest common subsequence of strings of lengths m and n?
The 0/1 knapsack problem solved with dynamic programming takes O(nW) time. Why is this called pseudo-polynomial?
A problem is NP-complete if it is:
Full step-by-step solutions: practise this topic on examproblems.com.