Singham and maze. Convert my recursive solution to memoized

https://ide.codingblocks.com/#/s/14292
@O17LPOLC0033 @vishal

you can do it easily. just give some to memoize this

how to memoise above code??
@vishal
@O17LPOLC0033

In order to memoize this code, you’ll have to consider 2 components for each room from 1 to n.
(1) The frequency with which the room is being entered (even/odd)
(2) Total steps upto that point
So the final answer would be stored in the element corresponding to room n+1.