Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.