Snake and Ladder Problem Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from source or 1st cell. Basically, the player has total control over outcome of dice throw and wants to find out minimum number of throws required to reach last cell. If the player reaches a cell which is base of a ladder, the player has to climb up that ladder and if reaches a cell is mouth of the snake, has to go down to the tail of snake without a dice throw. For example consider the board shown on right side (taken from here ),
Read full article from Snake and Ladder Problem - GeeksforGeeks
No comments:
Post a Comment