You are in (1,1) cell of a 5 × 5 grid . In each step, you can move either one cell right, one cell left, one cell up or one cell down . You have to reach cell (2, 4) in exactly 4 moves. You can't put your leg on cell (1, 3) as it is dangerous. Find number of ways of reaching the destination.
You also can't get out of the grid. There are no other restrictions.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
You have to move 3 steps up and 1 step right to reach out to your destination. This accounts for four moves, and you have exactly that many.
So, you can't afford moving a step left or down in any move.
So, let U denote a move one cell up and R denote a move one cell right.
The possibile combinations are
UUUR
UURU
URUU
RUUU
Out of the four combinations, 1 s t and 2 n d are eliminated as they require us to step on the (1, 3) cell, which isn't allowed.
So, the answer is 2