Intuitive and simple solution
Approach\n1. Sort the array\n2. Find the two numbers that are the closest to each other\n3. Split the list at those two numbers \n4. Perform the calculation\n\n
# Approach\n1. Sort the array\n2. Find the two numbers that are the closest to each other\n3. Split the list at those two numbers \n4. Perform the calculation\n\n\n# Code\n```csharp []\npublic class Solution {\n    public int FindValueOfPartition(int[] nums) {\n        Array.Sort(nums);\n        int minDiff = 2147483647; // maximum value an int can have\n        int place = default;\n        for(int i = 1; i < nums.Length; i++){\n            if(nums[i] - nums [i -1] < minDiff){\n                minDiff = nums[i] - nums [i -1];\n                place = i;\n            }\n        }\n        int[] nums1 = nums.Take(place).ToArray();\n        int[] nums2 = nums.Skip(place).ToArray();\n        return Math.Abs(nums1.Max() - nums2.Min());\n    }\n}\n```
['C#']