Beats 100% on runtime [EXPLAINED]
Intuition\nUnderstanding how the original array can be derived from the modified arrays, where each element has been adjusted by a positive integer k. Since we 
# Intuition\nUnderstanding how the original array can be derived from the modified arrays, where each element has been adjusted by a positive integer k. Since we know how the modified values relate to the original ones, we can reverse-engineer the original values.\n\n# Approach\nSort the given array, iterate through possible values of k by checking the difference between elements, and use a frequency map to match elements back to the original array while ensuring all pairs are valid.\n\n# Complexity\n- Time complexity:\nThe overall time complexity is O(n log \u2061n) due to sorting the array, where \uD835\uDC5B is the length of the input array. Each subsequent operation with the frequency map takes linear time.\n\n- Space complexity:\nThe space complexity is O(n) for storing the frequency map and the recovered array, as we may need to hold up to n/2 elements.\n\n# Code\n```csharp []\npublic class Solution {\n    public int[] RecoverArray(int[] nums) {\n        Array.Sort(nums);\n        int n = nums.Length;\n\n        for (int i = 1; i < n; i++) {\n            // Calculate potential k\n            int k = (nums[i] - nums[0]) % 2 == 1 ? -1 : (nums[i] - nums[0]) / 2;\n            if (k <= 0) continue;\n\n            var freqMap = new Dictionary<int, int>();\n            var recoveredArray = new List<int>();\n\n            foreach (var num in nums) {\n                if (freqMap.TryGetValue(num, out int count) && count > 0) {\n                    recoveredArray.Add(num - k);\n                    freqMap[num]--;\n                    if (freqMap[num] == 0) {\n                        freqMap.Remove(num);\n                    }\n                } else {\n                    freqMap[num + 2 * k] = freqMap.GetValueOrDefault(num + 2 * k, 0) + 1;\n                }\n            }\n\n            if (recoveredArray.Count == n / 2 && freqMap.Count == 0) {\n                return recoveredArray.ToArray();\n            }\n        }\n\n        return Array.Empty<int>(); // Return an empty array if no valid solution is found\n    }\n}\n\n```
['Array', 'Hash Table', 'Two Pointers', 'Sorting', 'Enumeration', 'C#']