Pls comment out the mistakes and kindy improve whereever required.
CellMitosis doubt in code
Hey @Sus you need to use Dynamic Programming to solve this question. Your code is simply doing recursive calls ,checking all possible cases multiple times which results in memory limit exceed and TLE eventually(dry run your code for sample case).
Try to think of a dp way to approach this problem.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.