Very Easy solution Just sort and calculate minimum of arrays element .
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nSort the array first and then calculate the difference between array cons
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nSort the array first and then calculate the difference between array consecutive elemnts and return minimum difference.\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int findValueOfPartition(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int minie=INT_MAX;\n        for(int i=1;i<nums.size();i++)\n        {\n            minie=min(minie,nums[i]-nums[i-1]);\n        }\n        return minie;\n    }\n};\n```\n\n\n\n
['C++', 'Java']