PAT

Don't try to copy your code from somwhere or change the browser tab
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Given a 5x6 snakes and ladders board, find the minimum number of dice throws required to reach the destination or last cell (30th cell) from the source (1st cell).
You are given an integer N denoting the total number of snakes and ladders and an array arr[] of 2*N size where 2*i and (2*i + 1)th values denote the starting and ending point respectively of ith snake or ladder.
The board looks like the following.

Input Format:
Size of board
Number of snakes and ladders
Output format:
Minimum number of dice throws required to reach the destination or last cell (30th cell) from the source (1st cell).






Status:

Input
8
{3, 22, 5, 8, 11, 26, 20, 29, 17, 4, 19, 7, 27, 1, 21, 9}

Expected Output
a) For 1st throw get a 2.
b) For 2nd throw get a 6.
c) For 3rd throw get a 2.

Your Programme Output
Hello World!!