[Python] Greedy || Hashmap || Priority Queue
\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        heapify(nums)\n        n0, h0 = len(nums), Counter(nums)\n        for kk i
```\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        heapify(nums)\n        n0, h0 = len(nums), Counter(nums)\n        for kk in map(lambda x: x - nums[0], nums):\n            if kk <= 0 or kk % 2: continue\n            ans, nms, n, h = [], nums[:], n0, h0.copy()\n            while True:\n                if n == 0: return ans\n                while not h[nms[0]]: heappop(nms)\n                num = heappop(nms)\n                if not h[num + kk]: break\n                h[num] -= 1\n                h[num + kk] -= 1\n                ans.append(num + kk // 2)\n                n -= 2\n```
['Greedy', 'Heap (Priority Queue)', 'Python']