Heap implementation

why isn’t the code running

hello @gulatigarvita08 please check now


if you still have any doubt you can ask here .
Happy Learning !!

no its not giving correct output . its the same as before

and its not working for type false

hello @gulatigarvita08 you have made errors in your push fucntion i have corrected them and now it is printing the correct output .
please go through the code and check :


Happy Learning !!

its still not giving correct output

please share the correct output .

1 2 3 4 5 6 7 8 9
its giving : 4 3 6 -1 1 5 7 8 9

this means that your code have more errors .


please see this .
this is the correct code .

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.