Python (Simple Sorting + Hashmap)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def recoverArray(self, nums):\n        n = len(nums)\n\n        nums.sort()\n\n        def function(k):\n            dict1, res = Counter(nums), []\n\n            for i in nums:\n                if i not in dict1:\n                    continue \n                elif i in dict1 and i+2*k in dict1:\n                    res.append(i+k)\n                    dict1[i] -= 1 \n                    dict1[i+2*k] -= 1 \n                    if dict1[i] == 0:\n                        del dict1[i]\n                    if dict1[i+2*k] == 0:\n                        del dict1[i+2*k]\n                else:\n                    return []\n\n            return res \n\n        for i in range(1,n):\n            val = nums[i] - nums[0]\n            if val != 0 and val%2 == 0:\n                p = function(val//2)\n                if p: return p\n\n        return []\n```
['Python3']