About This Pattern
Master the Max Heap pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.
Easy (1)
Last Stone Weight
Simulate smashing the two heaviest stones until one or none remain.
Key Signals:
Always pick largestMax heapAdd difference back