Last Stone Weight
Repeatedly smash the two heaviest stones together, keeping the difference, and report the final remaining weight. A max-heap shows the two heaviest stones at each step.
Repeatedly smash the two heaviest stones together, keeping the difference, and report the final remaining weight. A max-heap shows the two heaviest stones at each step.