- 121 One trade only โ track min price, update max profit
- 122 Unlimited trades โ greedy, take every upward move
- 309 With cooldown โ DP with 3 states:
holding / sold / idle - After
sold, you can only go toidleโ that's how cooldown enforces itself - Return
max(sold, idle)at the end;holdingmeans you never sold, so it doesn't count