Sort, take difference!
Intuition\nObservation: We need to make 2 arrays, however we can break the array anyway we want!\n\nWe want the largest element in Array1 to be the closest to t
# Intuition\nObservation: We need to make 2 arrays, however we can break the array anyway we want!\n\nWe want the largest element in Array1 to be the closest to the smallest element in Array2!\n\nWhy not sort it and check the difference between elements!\n\nReturn the smallest difference.\n\n# Code\n```\nclass Solution:\n    def findValueOfPartition(self, nums: List[int]) -> int:\n        min_diff = float(\'inf\')\n        for prev, curr in zip(sorted(nums), sorted(nums)[1:]):\n            min_diff = min(min_diff, curr - prev)\n        return min_diff\n\n        \n```
['Python3']