[Java]  easy solution
\nclass Solution {\n    public int lastStoneWeight(int[] stones) {\n        PriorityQueue<Integer>queue = new PriorityQueue<>(Comparator.reverseOrder());\n     
```\nclass Solution {\n    public int lastStoneWeight(int[] stones) {\n        PriorityQueue<Integer>queue = new PriorityQueue<>(Comparator.reverseOrder());\n        for (int item : stones)queue.add(item);\n        while (queue.size()>1){\n            int i1 = queue.poll();\n            int i2 = queue.poll();\n            if (i1!=i2)queue.add(Math.abs(i1-i2));\n        }\n        return queue.isEmpty()?0:queue.poll();\n    }\n}\n```
['Java']