limit candidate k's to those with at least n counts in all pairwise diffs
Intuition & Approach\n Describe your approach to solving the problem. \nInstead of only computing candidate k\'s using the smallest element of nums, we compute 
# Intuition & Approach\n<!-- Describe your approach to solving the problem. -->\nInstead of only computing candidate `k`\'s using the smallest element of `nums`, we compute all pairwise differences between all elements of `nums`, while tracking their counts. Valid candidate `k`\'s must have counts of at least `n`, the length of the original array.\n\n# Code\n```\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        nums.sort()\n\n        # get counts of all possible pairwise differences\n        N, diff_cnts = len(nums) // 2, Counter()\n        for i in range(2 * N):\n            for j in range(i):\n                diff_cnts[nums[i] - nums[j]] += 1\n\n        # candidates for 2k must have a difference-count of >= number of elements\n        # in the original array, and the difference value must be an even integer\n        candidate_k2s = sorted([(dc, dv) for dv, dc in diff_cnts.items() if dv % 2 == 0 and dc >= N], reverse=True)\n\n        nc = Counter(nums)\n        for _, k2 in candidate_k2s:\n            arr, ncc = [], copy.copy(nc)\n\n            for x in nums:\n                if ncc[x] == 0:\n                    continue\n\n                # there is a corresponding higher[i] to the current x as the lower[i]\n                if x + k2 in ncc and ncc[x + k2] > 0:\n                    arr.append(x + k2 // 2)\n                    ncc[x] -= 1\n                    ncc[x + k2] -= 1\n                # there isn\'t, thus we stop matching early for the current `k`\n                else:\n                    break\n\n            # all lower[i] & higher[i] elements in `nums` have been accounted for using\n            # the current value of `k`, thus the reconstructed `arr` is a valid answer\n            if len(arr) == N and ncc.total() == 0:\n                return sorted(arr)\n```
['Sorting', 'Counting', 'Python3']