Javascript 99% time
It\'s not optimal but it\'s efficient without using a priority queue. Just array manipulation \n\n```/*\n * @param {number[]} stones\n * @return {number}\n /\nv
It\'s not optimal but it\'s efficient without using a priority queue. Just array manipulation \n\n```/**\n * @param {number[]} stones\n * @return {number}\n */\nvar lastStoneWeight = function(stones) {\n    let size = stones.length;\n     \n    while(size >= 2){\n        stones.sort((a,b)=> { return a-b })\n        \n        x = stones.pop(); \n        y = stones.pop();\n        \n        if(x == y){\n            size -= 2;\n        }else{\n            size -= 1; \n            stones.unshift(x - y); \n        }\n    }\n    \n    return stones;\n};\n
[]