Easiest Solution Ever
Intuition\nHmm... perhaps sorting would make things much easier\n\n# Approach\nfirst sort the array and calcualte the minimum difference between 2 consecutive i
# Intuition\nHmm... perhaps sorting would make things much easier\n\n# Approach\nfirst sort the array and calcualte the minimum difference between 2 consecutive integers, this works cuz when the array is sorted, the smallest difference between any two elements that are next to each other in the sorted array will naturally give you the smallest value of the partition. This is because the two consecutive elements are the closest in value, and when you split the array between them, you get the smallest possible difference.\n\n\n# Complexity\n- Time complexity:\nO(NLogN)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution:\n    def findValueOfPartition(self, nums: List[int]) -> int:\n        nums.sort()\n        _min=10**9\n        for i in range(len(nums)-1):\n            _min=min(nums[i+1]-nums[i],_min)\n        return _min\n```
['Python3']