This program finds the maximum possible sales profit given an array of different prices. It has a time complexity of O(N).