GATE 2010 CS (CS1) – Question 22
Packages A,B process $n=10^k$ database records. A needs 0.0001n² time; B needs $10n\log_{10}n$. Find the smallest integer k for which B is faster.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) 6
Explanation
B is preferred when 10×10ᵏ×k < 10²ᵏ⁻⁴, equivalently k<10ᵏ⁻⁵. At k=5 this is 5<1, false; at k=6 it is 6<10, true. Smaller positive integer k also fail. Thus k=6, C.
More Asymptotic Analysis and Time/Space Complexity questions
- GATE 2015 CS (CS2) Q16
- GATE 2015 CS (CS2) Q26
- GATE 2015 CS (CS3) Q20
- GATE 2015 CS (CS3) Q37
- GATE 2015 CS (CS3) Q41
- GATE 2015 CS (CS3) Q64
All Asymptotic Analysis and Time/Space Complexity questions →