C++🔥||🔥 SORT🔥 ||🔥 and 🔥get adjacent minimum🔥
if this code helps you, please upvote solution. \n# Code\n\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        sort(nums.begi
# if this code helps you, please upvote solution. \n# Code\n```\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int n = nums.size();\n        int ans = nums[n-1];\n        for(int i = 1; i < n; i++){\n            ans = min(ans,nums[i]-nums[i-1]);\n        }\n        return ans;\n    }\n};\n```
['Sorting', 'C++']