Better than 100% in runtime. Simple C++ approach
Approach\nAlright, in this I am using Priority Queue. In this first I am adding all elements of the vector "stones" in the priority queue called "pq". Now I am 
# Approach\nAlright, in this I am using Priority Queue. In this first I am adding all elements of the vector "stones" in the priority queue called "pq". Now I am initializing a while loop, setting the condition that, the size of "pq" must be greater than 1. I am simply checking the top 2 elements and doing the required manipulations in the question. In the end, if size of "pq" is 0, return 0; else we should return the top element of the same.\n\n# Code\n```\nclass Solution {\npublic:\n    int lastStoneWeight(vector<int>& stones) {\n        int n=stones.size();\n        priority_queue<int> pq;\n        for(int i=0;i<n;i++)\n        {\n            pq.push(stones[i]);\n        }    \n        while(pq.size()>1)\n        {\n            int a=pq.top();\n            pq.pop();\n            int b=pq.top();\n            pq.pop();\n            if(a!=b)\n            {\n                int c=a-b;\n                pq.push(c);\n            }\n        }\n        if(pq.size()==0)\n        {\n            return 0;\n        }\n        else\n        {\n            int l=pq.top();\n            return l;\n        }\n    }\n};\n```
['Array', 'Heap (Priority Queue)', 'C++']