Solution in C
Code
# Code
```c []
int maximumDifference(int* nums, int numsSize) {
    int ans = -1;
    int min = nums[0];
    for (int i = 1; i < numsSize; i++) {
        if (nums[i] < min)
            min = nums[i];
        else {
            if (ans < nums[i] - min && min != nums[i])
                ans = nums[i] - min;
        }
    }
    return ans;
}
```
['C']