NeetCode #614LC-499HardGraphsNC Algo100
← Back to All Problems

#614 · #499 · The Maze III(迷宫 III)

📌 Problem Statement & Constraints

A ball rolls in a maze with 0 (empty), 1 (wall) and one hole. The ball falls into the hole if it passes over it. Given ball and hole, return the shortest instruction string using u, d, l, r, or impossible. Ties are broken by lexicographic order. 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!