NeetCode #572LC-909MediumGraphs
← Back to All Problems#572 · #909 · Snakes and Ladders(蛇梯棋)
📌 Problem Statement & Constraints
You are given an
n x n board representing a Snakes and Ladders board, numbered boustrophedon from the bottom-left. From square s you move to any of s+1 .. s+6; if that square has a snake or ladder (!= -1), you move to its destination. Return the minimum moves to reach square n^2, or -1. Constraints: 2 <= n <= 20.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!