NeetCode #719LC-1049Medium2-D Dynamic ProgrammingNC 250
← Back to All Problems#719 · #1049 · Last Stone Weight II(最后一块石头的重量 II)
📌 Problem Statement & Constraints
Given stone weights
stones, repeatedly smash two stones together: if they are equal both vanish, otherwise the larger becomes their difference. Return the smallest possible weight of the last remaining stone. Constraints: 1 <= stones.length <= 30, 1 <= stones[i] <= 100, so sum(stones) <= 3000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!