C++ || Peak Valley || Explanation
\nPeak Valley Concept\nEg  [7,1,5,4]\n\n \n7\n  \\      5\n   \\   /   \\\n     1       4\n\n    \nimin keep track ofvalley and imax keep track of difference of
\n**Peak Valley Concept**\nEg  `[7,1,5,4]`\n\n ```\n7\n  \\      5\n   \\   /   \\\n     1       4\n```\n    \n`imin` keep track of` valley` and `imax` keep track of difference of `current_element-valley`\nThe answer will be difference of [5-1]\n\n```\nint maximumDifference(vector<int>& nums) {\n        int imin=INT_MAX,imax=-1;\n        for(int i=0;i<nums.size();i++){\n            if(nums[i]<imin){\n                imin=nums[i];\n            }\n            else{\n                imax=max(imax,nums[i]-imin);\n            }\n        }\n        return imax==0?-1:imax;\n}\n```
[]