Sorting and min neighbor difference
Approach\nSorting and min neighbor difference\n# Complexity\n\n# Code\nkotlin []\nclass Solution {\n    fun findValueOfPartition(nums: IntArray): Int {\n       
# Approach\nSorting and min neighbor difference\n# Complexity\n![image.png](https://assets.leetcode.com/users/images/2a07cf6f-a82a-43eb-83cc-c0bb7f4291b2_1730199995.549498.png)\n# Code\n```kotlin []\nclass Solution {\n    fun findValueOfPartition(nums: IntArray): Int {\n        Arrays.sort(nums)\n        var min = Int.MAX_VALUE\n        for (i in 1 until nums.size) {\n            min = Math.min(min,nums[i]-nums[i-1])\n            if (min == 0) break\n        }\n        return min\n    }\n}\n```
['Kotlin']