fast solution
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)$$ -->\nsort: $$O(NlogN)$$\nfind:  $$O(N)$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(N)$$\n\n# Code\n```\nfunc recoverArray(nums []int) []int {\n    sort.Ints(nums)\n    n:=len(nums)-1\n    k1,k2 := (nums[1]-nums[0])/2, (nums[n]-nums[0])/2\n    if k1==0 {\n        k1=1\n    }\n    dict := make(map[int][]int)\n\n    for i:=0;i<=n;i++ {\n        if _,ok:= dict[nums[i]];!ok {\n            dict[nums[i]]=make([]int,0)\n        }\n        dict[nums[i]]=append(dict[nums[i]],i)\n    }\n\n    for k:=k1;k<=k2;k++ {\n        seen := make(map[int]bool)\n        res := make([]int,0)\n        f := true\n        for i:=0;i<=n;i++ {\n            if seen[i] {\n                continue\n            }\n            seen[i]=true\n            t := nums[i]+2*k\n            if v,ok:=dict[t];!ok {\n                f= false\n                break\n            }else {\n                 j := len(v)-1 \n                for j>=0 && seen[v[j]] {\n                    j--\n                }\n                if j< 0 {\n                     f= false\n                    break\n                }\n                tail := v[j]\n                seen[tail]=true\n                res=append(res,nums[i]+k)\n            }\n        }\n\n        if f {\n      return res\n        }\n\n        // if len(res)== len(nums)/2 {\n        //     return res\n        // }\n    }\n    return []int{}\n\n}\n\n\n\n\n```
['Go']