C++ SIMPLE AND CRISP CODE
Code\n\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int ans=INT_MAX;\n        
# Code\n```\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int ans=INT_MAX;\n        for(int i=1;i<nums.size();i++){\n            ans=min(ans,nums[i]-nums[i-1]);\n        }\n        return ans;\n    }\n};\n```
['C++']