$ cat ./coding/2126-destroying-asteroids.md
[Coding]
2126. Destroying Asteroids
────────────────────────────────────────────────────────────
class Solution:
def asteroidsDestroyed(self, mass: int, asteroids: List[int]) -> bool:
asteroids.sort()
for asteroid in asteroids:
if mass >= asteroid:
mass += asteroid
else:
return False
return True
--tags#Greedy
$ ls ./coding/ | grep -v 2126-destroying-asteroids