← Back to Games

Stock Trader Arena

Find the best day to buy and sell for maximum profit!

Maximum Profit
$0
-
Current Day
-
Current Price
-
Min Price So Far
-
Best Buy Day
-
Best Sell Day
Buy Day
Sell Day
Current
Min So Far
Click "Step" to start analyzing prices...

📐 Algorithm

minPrice = prices[0] maxProfit = 0 for each day: if price < minPrice: minPrice = price // Found cheaper buy day profit = price - minPrice if profit > maxProfit: maxProfit = profit // Found better trade