sir why we are getting different output when we are doing
the first method(non optimized method) and when we are doing the second method(heapify method).
Convert vector/array to heap
hello @YASHMATHURIA123
output should be same from both the approaches.
please mention the video name i will check.
ok so see structure of heap may vary for both the approaches.
but at the end u will be getting only sorted output after applying heapsort ( from both the approaches)