Start learning →

Mathematical analysis of an algorithm replaces the stopwatch with

Arunning the code on 10,000 random inputs
Bbuying faster hardware to reduce variance
Ccounting operations as a function of input size
Dwriting the code in a faster language like C
Answer & Solution
Correct answer: C. counting operations as a function of input size
Mathematical analysis sidesteps hardware and language entirely by expressing the work the algorithm does as a function of input size. **The other options are still empirical:** they may speed up the experiment but cannot generalise to unseen inputs or hardware.
Practise this question with Quill — GATE CSE →

Keep practising Algorithms

Browse all Algorithms questions for GATE CSE, or explore more Computer Science topics.

Start a Algorithms lesson →
Related questions