arin2002 / Hacktoberfest-2022

For hacktoberfest do fork and star the repo to participate otherwise you won't be able to participate.......You can follow me for more updates :)
MIT License
104 stars 320 forks source link

Snake & Ladder problem | Graph Data Structure #861

Closed Ps1231 closed 2 years ago

Ps1231 commented 2 years ago

Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from the source or 1st cell. Basically, the player has total control over the outcome of the dice throw and wants to find out the minimum number of throws required to reach the last cell. If the player reaches a cell which is the base of a ladder, the player has to climb up that ladder and if reaches a cell is the mouth of the snake, and has to go down to the tail of the snake without a dice throw. It will take input from user about no of ladders and no of snakes and their position from one point to another and then gives the minimum moves required to reach 100 in snake and ladder game.