Sorry for the wrong answer. I think this is how its done.The random node deletion will take O(n)+O(log(n)).
At first I need to search for the node in the heap(O(n)) then I can exchange the element with the last element.
After exchange we can delete the last element and decrease the heap size by 1. Then I can apply max/min Heapify at the earlier position of the where the value was present which will take O(log n).
Please refer : https://gateoverflow.in/273601/made-easy-test-series
Thank you
1163 Points
306 Points
305 Points
237 Points
192 Points
137 Points
118 Points
108 Points
96 Points
95 Points