I have made a well detailed video in which I solve all 5 leetcode variants of best time to buy and sell stocks.
- Best Time to Buy and Sell Stock (Easy): https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
- Best Time to Buy and Sell Stock with Transaction Fee (Medium): https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/
- Best Time to Buy and Sell Stock with Cooldown (Medium): https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
- Best Time to Buy and Sell Stock III (Hard): https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
- Best Time to Buy and Sell Stock IV (Hard): https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/
For each problem: I discuss the problem statement followed by detailed dp solutions followed by live code and submit on LC.
Since I feel it will be useful to at least some part of the community so I am putting this here:
It will premier in an hour and I will stick in the chat to help resolve any doubts.