cpp soln
int maximumDifference(vector& nums) {\n        vector v;\n     for(int i=0;i<nums.size();i++)\n     {\n       for(int j=i+1;jnums[i])\n           v.push_back(nu
int maximumDifference(vector<int>& nums) {\n        vector<int> v;\n     for(int i=0;i<nums.size();i++)\n     {\n       for(int j=i+1;j<nums.size();j++)\n       {\n         if(nums[j]>nums[i])\n           v.push_back(nums[j]-nums[i]);\n       }\n     }\n      sort(v.begin(),v.end());\n      \n      if(v.size()==0)\n        return -1;\n      else\n      return v[v.size()-1];\n    }\n};
['C++']