Greedy Approch
\nclass Solution {\n   public  boolean asteroidsDestroyed(int mass, int[] arr) {\n\t\tArrays.sort(arr);\n        long sum = mass;\n\t\tfor (int i = 0; i < arr.l
```\nclass Solution {\n   public  boolean asteroidsDestroyed(int mass, int[] arr) {\n\t\tArrays.sort(arr);\n        long sum = mass;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif (sum >=arr[i]) {\n\t\t\t\tsum += arr[i];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n```
['Java']