simple and easy C++ solution 😍❤️‍🔥
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) \n    {\n        so
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n```\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) \n    {\n        sort(nums.begin(), nums.end());\n        int ans = INT_MAX, n = nums.size();\n        for(int i=0;i<n-1;i++)\n            ans = min(ans, nums[i+1] - nums[i]);\n        return ans;\n    }\n};\n```
['Array', 'Sorting', 'C++']