I am solving this question from leetcode…
650. 2 Keys Keyboard
Here i have come up with the only recursive approch(Late i will memoize it).
But here i am getting wrong answer.
This is my code…
Please check this, i am not able to find the Bug.
Thanks