LeetCode 773: Sliding Puzzle
Problem Restatement We are given a 2 x 3 sliding puzzle board. The board contains the numbers 1 through 5 and one empty slot represented by 0 . A move consists of swapping 0 with one of its 4-directionally adjacent numbers. The goal state is: [[1, 2, 3], [4, 5, 0]] Return the least number of moves needed to reach the goal state. If it is impossible, return -1 ....