Search
⌘K

Leetcode 2126. Destroying Asteroids

Given a starting mass and asteroid masses, determine whether you can order collisions so the planet can sequentially absorb every asteroid (absorbing requires current mass >= asteroid and increases the planet's mass). The core challenge is a greedy cumulative-sum check (sort small-to-large) to see if the planet's mass can stay >= each next asteroid.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid March, 2026

Meta

Senior

Early March, 2026

Meta

Mid-level

Your account is free and you can post anonymously if you choose.