<@U8CJDNG2V> Why not: ``` val minPrize = prices.mi...
# stdlib
m
@asad.awadia Why not:
Copy code
val minPrize = prices.min()
val maxProfit = prices.min() - minPrize
?
a
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