C++ || Simple Brute Force Solution
Complexity\n- Time complexity: O(N^2)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n# 
# Complexity\n- Time complexity: O(N^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximumDifference(vector<int>& nums) {\n        int maxi = 0;\n        bool flag = false;\n        for(int i=0;i<nums.size();i++){\n            for(int j=i+1;j<nums.size();j++){\n                if(maxi<(nums[j]-nums[i])){\n                    maxi = nums[j]-nums[i];\n                    flag = true;\n                }\n            }\n        }\n        if(flag)return maxi;\n        return -1;\n    }\n};\n```
['C++']