Buy and Sell Stocks with a cooldown of atleast K days with unlimited number of transactions

How to solve this question.
I tried using the state space machine approach buy not able to write the logic of transformation from one state to another.
this is similar to one of the leetcode questions.

Comments (0)