solution with image||c++||java||easy solution||
\n\n# Code\n\nint maximumDifference(int* nums, int numsSize) {\n    int dmax = 0;\n    for (int i = 0; i < numsSize; i++) {\n        for (int j = i + 1; j < num
\n\n# Code\n```\nint maximumDifference(int* nums, int numsSize) {\n    int dmax = 0;\n    for (int i = 0; i < numsSize; i++) {\n        for (int j = i + 1; j < numsSize; j++) {\n            int diff = nums[j] - nums[i];\n            if (diff > dmax) {\n                dmax = diff;\n            }\n        }\n    }\n    if (dmax == 0) {\n        return -1; \n    } else {\n        return dmax;\n    }\n}\n```
['Array', 'C', 'C++', 'Java', 'JavaScript']