https://leetcode.com/problems/maximum-difference-between-increasing-elements/


Runtime: 165 ms, faster than 6.25% of TypeScript online submissions for Maximum Difference Between Increasing Elements.

Memory Usage: 48.6 MB, less than 6.25% of TypeScript online submissions for Maximum Difference Between Increasing Elements.


```typescript
function maximumDifference(nums: number[]): number {
    //8:03
    let max_diff = -1
    for (const [i, num_i] of nums.entries()) {
        const newNums = nums.slice(i, nums.length)
        for (const [j, num_j] of newNums.entries()) {
            const diff = num_j - num_i
            if (diff > 0) {
                if (diff > max_diff) {
                    max_diff = diff
                }
            }
        }
    }
    return max_diff
    //8:06
};
```
