Python.  Beats 100%.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nsort nums\n\ncreate a d
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nsort nums\n\ncreate a dictionary with Counter of all vals\n\ncreate a test array testing abs(nums[0] - nums[i]) for i in range(1,n//2+1)\n\nthe n//2+1 upperbound is included because if n == 10, and nums is sorted, for nums[0], the maximum index for which nums[0] could be paired up with is nums[5]. \n\nThen run a for loop testing each possibility.  the difference has to be divisible by 2 and > 1. Divisible by 2 because the differences we are testing are 2*k, so if the differnece is 7, k would have to be 3.5 which is not an integer and invalid.\n\ni copy the dicitonary, and -=1 in the copied dictionary for each [val] and  [val + c], and i break the forloop as soon i encounter a  [val+c] either not in dictionary or with value 0.  \n\nbreak the testing for loop as soon as you identify a value that will work, then build the array bestans.\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```\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        from collections import Counter\n        nums.sort()\n        n = len(nums)\n        vals = Counter(nums)\n                \n        test = [abs(x-nums[0]) for x in nums[1:len(nums)//2+1]]\n        \n        ans = 0\n        for c in test:\n            if c % 2 != 0 or c==0:\n                continue\n            cvals = dict(vals)\n            flag = 0\n            for num in nums:\n                if cvals[num] > 0:\n                    if num+c in cvals and cvals[num + c] > 0:\n                        cvals[num] -= 1\n                        cvals[num+c] -= 1\n                    else:\n                        flag = 1\n                        break\n            if not flag:\n                ans = c\n                break\n                \n        bestans = []\n        for num in nums:\n            if vals[num] > 0:\n                bestans.append(num+ans//2)\n                vals[num] -= 1\n                vals[num+c] -= 1\n                \n        return bestans\n        \n            \n                \n```
['Python', 'Python3']