[Java] Sort
\nclass Solution {\n    public int findValueOfPartition(int[] nums) {\n        Arrays.sort(nums);\n        int res = nums[1] - nums[0];\n        for (int i = 2;
```\nclass Solution {\n    public int findValueOfPartition(int[] nums) {\n        Arrays.sort(nums);\n        int res = nums[1] - nums[0];\n        for (int i = 2; i < nums.length; i++)\n            res = Math.min(res, nums[i] - nums[i - 1]);\n        return res;\n    }\n}\n```
['Java']