What's wrong in my code


I created minHeap as in the example it is being explained

hello @nitinchoudhary260

why u r building heap for every new query?

after insertion u just have to call heapify on last element

Ok Thanks for the suggesstion

https://ide.codingblocks.com/s/477101 What I am doing wrong here