What is a brute-force algorithm?
- AOne that runs on many processors
- BOne that tries all possible candidate solutions
- COne that guesses an answer at random
- DOne that always uses recursion
What is a brute-force algorithm?
What is the running time of counting sort for n integers in the range 0 to k?
What is the worst-case time complexity of insertion sort?
How much stack space does a simple recursive factorial function fact(n) = n × fact(n − 1) use?
A recurrence T(n) = 2T(n/2) + O(n) solves to:
Dynamic programming is useful when a problem has:
What is the running time of Dijkstra's algorithm with a binary heap on a graph with V vertices and E edges?
What did the Cook–Levin theorem establish?
Full step-by-step solutions: practise this topic on examproblems.com.