Available question text
Given a 2x3 sliding puzzle with tiles 1–5 and a blank (0), find the minimum number of swaps of 0 with its 4-directional neighbors to reach the target [[1,2,3],[4,5,0]] (or return -1 if impossible). This is a shortest-path search in the permutation state graph (solvable via BFS/heuristic search due to the small state space).
Related questions
Continue with questions that share topics or the same question type.
- Before and After Puzzle
Coding
- Design a Sliding-Window Event Stream Processor with Checksum Validation and Average Payload Length
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Implement a rate limiter using the sliding window log algorithm
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 2 records
Amazon
Leetcode 773. Sliding Puzzle
Reported Apr 24, 2025 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View sourceMicrosoft
Leetcode 773. Sliding Puzzle
Reported Oct 27, 2025 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source