Mental Model
We want to find the best times to buy and sell stocks to make the most money. The key is to track prices and decide when to buy low and sell high.
Analogy: Imagine you are at a fruit market where prices change every day. You want to buy fruit when it's cheap and sell it when the price goes up to make a profit.
Day: 0 1 2 3 4 5
Price: 7 -> 1 -> 5 -> 3 -> 6 -> 4 -> null
↑
start