PRASHNIKAप्रश्निका
Back to the paper

For Big O notation, state the difference between and .

Computer Science20251 markShort answer
For Big O notation, state the difference between $O(n)$ and $O(n^2)$.

Answer

Answer

Official answer key
$O(n)$ denotes linear time complexity, where the running time grows directly in proportion to the input size $n$; it is typically produced by a single loop that runs $n$ times. $O(n^2)$ denotes quadratic time complexity, where the running time grows in proportion to the square of $n$; it is typically produced by a nested loop (a loop inside a loop), and so it grows far faster than $O(n)$ as $n$ increases.
Complexity and Big O notation

From ISC 2025 Specimen Computer Science Paper 1, question 1(ix).