I can not see why the heapsort is considered an inplace sorting algorithm.
I mean an extra data structure populated with the elements of the array to be sorted i.e. a heap, is used to assist in the extraction of the min value and the sorting process.
So may be I am misunderstanding the definition of inplace here?
But insertion sort for example it is obvious that it is inplace algorith, i.e. no extra memory needed for the elements.
So why is it considered inplace?