I dont seem to get correct answer

code : https://ide.codingblocks.com/s/240010

Hey @adityakaunhai
Your output is fine
Output won’t be sorted remember this
Heap elements only maintain property of being bigger or smaller than parents and not giving sorted output when printed directly the way you did

can you please suggest the changes that i need to make?

@adityakaunhai buddy
I just told you your code is correct
What will I correct in correct code buddy :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.