Find Maximum Difference
Given a list of integers, find the maximum difference of two elements where the larger number appears after the smaller number.
Write an algorithm to find the maximum difference of two elements where the larger number appears after the smaller number.
Input
The first line of input consists of an integer - inputArray_size, representing the size of the list (N).
The next line consists of N space-separated integers representing the elements of the list.
Output
Print an integer representing the maximum difference of the two elements where the larger number appears after the smaller number. If no such elements are found, print 0.