What does it mean if an operation runs in O(1) time?
- AIt can only be run once
- BIts running time does not grow with the input size
- CIt always takes exactly one second
- DIt processes exactly one element per second of running time
What does it mean if an operation runs in O(1) time?
What is the worst-case time complexity of insertion sort?
What is log₂ 1024?
You sort an array of n elements once and then answer k membership queries with binary search. What is the total cost?
Dynamic programming is useful when a problem has:
What does the recurrence T(n) = T(n − 1) + O(n) solve to?
Topological sorting is possible only for:
Which statement about P and NP is correct?
Full step-by-step solutions: practise this topic on examproblems.com.