A problem is usually called tractable if:
- AIt can be solved in constant time
- BIt can be solved in polynomial time
- CIt has no solution
- DIt can only be solved by trying every possibility
A problem is usually called tractable if:
Which of these grows slowest as n becomes large?
Which of these running times is polynomial?
What is the time complexity of: for i = 1 to n: for j = 1 to i: do O(1) work?
How many levels does the recursion of merge sort have for an array of n elements?
Breadth-first search on an unweighted graph finds:
What are the time and space costs of computing the n-th Fibonacci number with a loop that keeps only the last two values?
What is the time complexity of: for i = 1 to n: for (j = i; j ≤ n; j = j + i) do O(1) work?
Full step-by-step solutions: practise this topic on examproblems.com.