NeetCode #619LC-773HardGraphs
← Back to All Problems

#619 · #773 · Sliding Puzzle(滑动谜题)

📌 Problem Statement & Constraints

On a 2x3 board there are tiles 1-5 and a blank (0). A move slides a tile into the adjacent blank. Given a board configuration, return the minimum moves to reach [[1,2,3],[4,5,0]], or -1. Constraints: board.length == 2, board[i].length == 3, the board is a permutation of 0..5.
🔒

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!