Simple Java O(nlogn) solution using sorting
Code\n\nclass Solution {\n    public int findValueOfPartition(int[] nums) {\n        Arrays.sort(nums);\n        \n        int minDiff = Integer.MAX_VALUE;\n   
# Code\n```\nclass Solution {\n    public int findValueOfPartition(int[] nums) {\n        Arrays.sort(nums);\n        \n        int minDiff = Integer.MAX_VALUE;\n        for(int i=nums.length-1; i>0; i--) {\n            int diff = nums[i] - nums[i-1];\n            minDiff = Math.min(diff, minDiff);\n        }\n        \n        return minDiff;\n    }\n}\n```
['Sorting', 'Java']