# @param {Integer[]} prices
# @return {Integer}
def max_profit(prices)

end




ex1 = [7,1,5,3,6,4] #=> 7
ex2 = [1,2,3,4,5]   #=> 4
ex3 = [7,6,4,3,1]   #=> 0

raise 'FAIL' unless max_profit(ex1) == 7
# raise 'FAIL' unless max_profit(ex2) == 4
# raise 'FAIL' unless max_profit(ex3) == 0
