Hacker News new | ask | show | jobs
by d--b 1584 days ago
problem is when you pop the min, you can't know which was the second to min unless you do the trick that's in the website quoted.
1 comments

You don't pop the min, you pop the top of the stack.
Yes. Of course. But what do you do when the top of the stack IS the min? Your new min should change, but you won't have the information to update to the second min unless you do the trick in the article.