Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



There are many sorting algorithms based on comparison. The running time of heapsort algorithm is $O(n\lg n)$. Like $P$, but unlike $Q$, heapsort sorts in place where $(P,Q)$ is equal to:





Solution

Heapsort is an in-place sorting algorithm.

Insertion sort is also an in-place sorting algorithm.

But merge sort is not considered in-place because it requires extra memory for merging.

So, heapsort sorts in place like insertion sort, but unlike merge sort.

Therefore,

$(P,Q)=(Insertion\ sort,\ Merge\ sort)$



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...