unable to delete any random node from the heap. let m know where I am going wrong , providing the link below
Heaps https://ide.codingblocks.com/s/223043
u can take any test case .it gives same output as deletepeek .say, we take
10
1 3 5 7 9 11 13 19 12 16 12
it gives output:
19 16 11 12 13 3 9 1 7 5
16 13 11 12 5 3 9 1 7
16 13 11 12 5 3 9 1 7
which is wrong as 12 should be deleted from heap
@ashutoshu
Silly mistake with a return statement
I’ve updated and commented the issue here
Please see this
Kindly close this doubt
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.