Simple C++ Solution
\nclass Solution {\npublic:\n    vector<int> recoverArray(vector<int>& nums) {\n        int n = nums.size();\n        sort(nums.begin(), nums.end());\n        u
```\nclass Solution {\npublic:\n    vector<int> recoverArray(vector<int>& nums) {\n        int n = nums.size();\n        sort(nums.begin(), nums.end());\n        unordered_map<int, int> mp, mpp;\n        for(int i = 0; i < nums.size(); i++) {\n            mp[nums[i]]++;\n            mpp[nums[i]]++;\n        }\n        for(int i = 1; i < n; i++) {\n            bool ok = true;\n            int k = (nums[i]-nums[0])/2;\n            if(k == 0) continue;\n            vector<int> res;\n            for(int j = 0; j < n; j++) {\n                if(mpp[nums[j]] == 0) continue;\n                if(mpp[nums[j]+2*k] == 0) {\n                    ok = false;\n                    break;\n                }\n                mpp[nums[j]]--, mpp[nums[j]+2*k]--;\n                res.push_back(nums[j]+k);\n            }\n            mpp = mp;\n            if(ok) return res;\n        }\n        return {};\n    }\n};\n```
['Greedy', 'C']