Adjacent Minimum
Approach\nSort the array and return the minimum of difference of adjancents.\n\n# Complexity\n- Time complexity:\nO(NlogN)\n\n- Space complexity:\nO(1)\n\n# Cod
# Approach\nSort the array and return the minimum of difference of adjancents.\n\n# Complexity\n- Time complexity:\nO(NlogN)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        int ans = 1e9;\n        int n = nums.size();\n        sort(begin(nums),end(nums));\n        for(int i=0;i<n-1;i++){\n            int val = nums[i+1] - nums[i];\n            ans = min(ans,val);\n        }\n        \n        return ans;\n    }\n};\n```
['Greedy', 'Sorting', 'C++']