C# LINQ one-liner, O(N*logN) time
\npublic class Solution \n{\n    public bool AsteroidsDestroyed(int mass, int[] a)\n        => a.OrderBy(x => x)\n            .Aggregate((long) mass, (planet, a
```\npublic class Solution \n{\n    public bool AsteroidsDestroyed(int mass, int[] a)\n        => a.OrderBy(x => x)\n            .Aggregate((long) mass, (planet, asteroid) => planet >= asteroid ? planet + asteroid : -1) > 0;\n}\n```
[]