Find the maximum difference between two numbers in an array, given that the smaller number must occur before the larger number in the array. Determine the Big O.
Sigiloso
You can use nested for loops to solve this approach, but it will run in O(n^2) time. They asked for a faster algorithm running in O(n) which takes the approach of constantly checking/updating the lowest value and maxdiff at the same time.