solulubeta
Sign in
NeetCode 150 / Heap / Priority Queue
09.02 · Problem

Last Stone Weight

Easy Max-heap simulation 1 video LC 1046 Pro

This problem is part of solulu Pro

Each turn, take the two heaviest stones x ≤ y and smash them: if x == y both are destroyed, otherwise the result is a single stone of weight y − x. Repeat until at most one stone is left. Return its weight, or 0 if none…

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 65 of 150 · updated 2026-10-12