Java || Don't worry My Solution is Best || 100% || 92% || 39,6 MB
\t*   class Solution {\n\t\t\tpublic  int lastStoneWeight(int[] stones) {\n\t\t\t\tArrayList list = new ArrayList<>();\n\t\t\t\tfor (int a : stones) {\n\t\t\t\t
\t*   class Solution {\n\t\t\tpublic  int lastStoneWeight(int[] stones) {\n\t\t\t\tArrayList<Integer> list = new ArrayList<>();\n\t\t\t\tfor (int a : stones) {\n\t\t\t\t\tlist.add(a);\n\t\t\t\t}\n\t\t\t\tCollections.sort(list);\n\t\t\t\twhile (list.size() > 1) {\n\t\t\t\t\tint a = list.size();\n\t\t\t\t\tif (list.get(a - 1) > list.get(a - 2)) {\n\t\t\t\t\t\tlist.add(( list.get(a - 1) -list.get(a - 2)));\n\t\t\t\t\t\tlist.remove(a-2);\n\t\t\t\t\t\tlist.remove(a-2);\n\t\t\t\t\t\tCollections.sort(list);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.remove(a - 1);\n\t\t\t\t\t\tlist.remove(a -2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (list.size()==1){\n\t\t\t\t\treturn list.get(0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n}
['Array', 'Java']