The number of elements that can be sorted in (log n) time using heap sort is
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2013 · Q30
Time
Select one answerSingle correct
Solution
Official answer: C) ((log n)/(log log n) )
Searching, Sorting and HashingLet be the number of elements to be sorted.
The time complexity of heap sort to sort elements is .
We are given that the sorting time is , so:
Let us test option (C), where :
Thus, elements can be sorted in time using heap sort. Option (C) is correct.
Try the question first, then check your work.
Examiner trap
Heap sort on elements takes time. Set and solve for .
This Searching, Sorting and Hashing previous year question is Q30 of the GATE CSE 2013 paper. Find more GATE CSE PYQs on Searching, Sorting and Hashing in Algorithms, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Searching, Sorting and Hashing PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Searching, Sorting and Hashing has 27 GATE CSE PYQs across 20 papers from 2012 to 2026. 7 of them are 2-mark MCQs like this one, and GATE CSE 2013 has 2.
How GATE tests Searching, Sorting and HashingIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.