Simulate smashing stones with a max-heap to find the final remaining weight.
Constraints
Example
>>> last_stone_weight([2,7,4,1,8,1]) 1 >>> last_stone_weight([1]) 1 >>> last_stone_weight([]) 0
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints