Java Solution
\n\n# Complexity\n- Time complexity: O(nlogn)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n
\n\n# Complexity\n- Time complexity: O(nlogn)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int findValueOfPartition(int[] nums) {\n        Arrays.sort(nums);\n        int val = Integer.MAX_VALUE;\n        for(int i=0 ; i<nums.length-1 ; i++){\n            val=Math.min(val,(nums[i+1]-nums[i]));\n        }\n        return val;\n    }\n}\n```
['Array', 'Greedy', 'Sorting', 'Java']