Simple C++ 100/100
\nclass Solution {\npublic:\n    int lastStoneWeight(vector<int>& stones) \n    {\n        for(int i=stones.size()-1; i>=1;)\n        { \n            sort(stone
```\nclass Solution {\npublic:\n    int lastStoneWeight(vector<int>& stones) \n    {\n        for(int i=stones.size()-1; i>=1;)\n        { \n            sort(stones.begin(),stones.end());\n            \n            auto iNum           = stones[i];\n            auto iM1Num         = stones[i-1];\n            auto temp           = iNum - iM1Num;\n\n            stones.pop_back();\n            stones.pop_back();\n\n             if(iNum  != iM1Num)\n                stones.push_back(temp);\n\n            i = stones.size()-1;\n        }\n        return stones.size() > 0 ? stones[0] : 0;\n    }\n};\n```
[]