I am trying to delete the peek element in the max heap. It gives correct output for deleting the first element but after that, it gives the incorrect output. Please help me identify the mistake in my code.
Delete peek element in max heap
Hello @Kajal
Your deletePeek function implementation was wrong.
I have modified it for you and also added some comments.
Here is the code
Let me know if you still need any help.