Similar Problems

Similar Problems not available

Snake and Ladder Problem - Leetcode Solution

LeetCode:  Snake and Ladder Problem Leetcode Solution

Difficulty: Unknown

Topics: graphs  

Problem statement

Given a snake and ladder coordinates which represent the actual snake and ladder board, find the minimum number of dice throws required to reach the destination cell from source cell. This problem can be easily solved bu using 0-1 BFS.

Example Input

Size = 100

Snakes = {{24, 14},{56, 21}, {88, 34},{99, 3}}

Ladders = {{4, 57},{18, 36},{44, 97},{67, 88}}

Expected Output

7

Snake and Ladder Problem Solution Code

1