1046 | JavaScript Recursive One-Liner
Runtime: 64 ms, faster than 52.83% of JavaScript online submissions\n> Memory Usage: 35.2 MB, less than 100.00% of JavaScript online submissions\n\n\nconst last
> Runtime: **64 ms**, faster than *52.83%* of JavaScript online submissions\n> Memory Usage: **35.2 MB**, less than *100.00%* of JavaScript online submissions\n\n```\nconst lastStoneWeight = s =>\n  1 === s.length\n    ? s[0]\n    : lastStoneWeight(s.sort((a, b) => a - b).concat(s.pop() - s.pop()));\n```\n
['Recursion', 'JavaScript']