1.

In what position does the array for heap sort contains data?(a) 0(b) 1(c) -1(d) anywhere in the arrayThis question was addressed to me in an online quiz.This question is from Heapsort in portion Sorting of Data Structures & Algorithms II

Answer»

Right option is (a) 0

Easy explanation - The array for heap sort contains data at position 0 whereas for a BINARY heap, array BEGINS at 1. This is the reason for its COMPLEXITY.



Discussion

No Comment Found

Related InterviewSolutions