asad.awadia
prices.forEach { maxProfit = maxOf(maxProfit, it - minPrice) minPrice = minOf(minPrice, it) }