Very Easy | C++  | 3 liner | Beginner Friendly
\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        // there\'s no problem with the order of the elements\n        // so sor
```\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        // there\'s no problem with the order of the elements\n        // so sort them first\n        sort(nums.begin(), nums.end());\n\t\t\n        int res = nums[1]-nums[0];\n\t\t\n        for(int i = 1 ; i < nums.size() ; i++) res = min(res, nums[i]-nums[i-1]);\n\t\t\n        return res;\n    }\n};\n```
['C']