NeetCode #611LC-505MediumGraphsNC Algo100
← Back to All Problems#611 · #505 · The Maze II(迷宫 II)
📌 Problem Statement & Constraints
A ball rolls in a maze until it hits a wall. Given
start and destination, return the shortest distance (number of empty cells passed, excluding the start) for the ball to stop at the destination, or -1. Constraints: 1 <= m, n <= 100.🔒
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!