I am studying the heap sort algorithm from the book Introduction to Algorithms by Thomas H. Corman. It differentiates between the length of the array,
"the number of elements in the array"
"represents how many elements in the heap are stored within array
I am trying to visualize a case when
A.heapsize will not be equal to
- When does an element of a heap not reside in the array?
- Is there a practical scenario where
A.heapsize < A.length?