value of partition || java
Complexity

Time complexity:
O(nlogn)


Space complexity:
O(1)

Code
# Complexity
- Time complexity:
$$O(nlogn)$$

- Space complexity:
$$O(1)$$

# Code
```java []
class Solution {
    public int findValueOfPartition(int[] nums) {
        Arrays.sort(nums);
        int minDiff = Integer.MAX_VALUE;
        for(int i = nums.length - 1; i > 0; i--){
            minDiff = Math.min(minDiff, nums[i] - nums[i - 1]);
        }
        return minDiff;
    }
}
```
['Java']