Find two numbers in an array such that the second number is greater than the first one and the diff is maximum. Mathematical proof that my solution works in all cases
Anonymous
Solved using two variables O(n)
Check out your Company Bowl for anonymous work chats.