JS Solution
Code\n\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar recoverArray = function (nums) {\n    nums.sort((a, b) => (a - b));\n\n    for (let i = 
# Code\n```\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar recoverArray = function (nums) {\n    nums.sort((a, b) => (a - b));\n\n    for (let i = 1; i <= nums.length / 2; i++) {\n        let twiceK = nums[i] - nums[0];\n        if (twiceK === 0 || twiceK % 2 === 1) continue;\n        let result = [];\n        let map = new Map();\n        for (let num of nums) {\n            let count = map.get(num - twiceK);\n            if (!count) {\n                map.set(num, (map.get(num) || 0) + 1);\n            } else {\n                result.push(num - twiceK / 2);\n                map.set(num - twiceK, count - 1);\n            }\n        }\n        if (result.length === nums.length / 2) {\n            return result;\n        }\n    }\n\n    return [];\n};\n```
['JavaScript']