val minPrize = prices.min()
val maxProfit = prices.min() - minPrize
?
a
asad.awadia
03/07/2018, 2:00 PM
it's the stock profit question - the buy needs to happen before the sells -- doing a simple min/max won't work for [7,4,1] where prices[i] is the price of the stock