Easy Solutions using Two Heaps
\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        PriorityQueue<Integer> maxHeap = new PriorityQueue<>((a,b)->b-a)
```\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        PriorityQueue<Integer> maxHeap = new PriorityQueue<>((a,b)->b-a);\n        PriorityQueue<Integer> minHeap = new PriorityQueue<>();\n        \n        for(int val:asteroids)\n            maxHeap.add(val);\n        \n        long bigMass = mass;\n        \n        while(maxHeap.size()>0){\n            int curr = maxHeap.poll();\n            \n            if(bigMass>=curr){\n                bigMass+=curr;\n                while(minHeap.size()>0 && bigMass>=minHeap.peek()){\n                    bigMass+=minHeap.poll();\n                }\n            }\n            else{\n                minHeap.add(curr);\n            }\n        }\n        \n        return minHeap.size()==0 && maxHeap.size()==0;\n    }\n}\n```
['Sorting', 'Heap (Priority Queue)', 'Java']