Python - Solution using recursion
\nclass Solution:\n    def lastStoneWeight(self, nums: List[int]) -> int:        \n        if not nums:\n            return 0\n        \n        elif len(nums) 
```\nclass Solution:\n    def lastStoneWeight(self, nums: List[int]) -> int:        \n        if not nums:\n            return 0\n        \n        elif len(nums) == 1:\n            return nums[0]\n        \n        elif len(nums) == 2:\n            return abs(nums[0] - nums[1])\n        \n        else:\n            max1 = max(nums)\n            nums.remove(max1)\n            max2 = max(nums)\n            nums.remove(max2)\n        \n            if max1 != max2:\n                val = abs(max1-max2)\n                nums.append(val)\n\n        val = self.lastStoneWeight(nums)\n        return val\n```
['Recursion', 'Python', 'Python3']