5 questions to test your understanding
Algorithm A runs in O(n) time and Algorithm B runs in O(n²) time. A student claims A is always faster than B for any input size. What is the strongest counterargument?
Suppose f(n) = 1000n and g(n) = n². Which statement is true?
An algorithm proved to be Θ(n log n) is also O(n log n).
The statement 'comparison-based sorting requires Ω(n log n) comparisons' means that no specific known sorting algorithm can do better — but a hypothetical future algorithm might.
Why does the formal definition of Big-O (f(n) ≤ c · g(n) for all n ≥ n₀) justify dropping constant factors and lower-order terms?