Find the maximum difference between two numbers in a given array.
Anonymous
You’d run through the array from the 0th node to the nth node while storing the largest and smallest numbers in int variables. It’s easy then to calculate the difference: largest - smallest
Check out your Company Bowl for anonymous work chats.