LeetCode 69 Problem 3 - Sliding Puzzle

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Hey man, I know this vid is old but what would the main function look like? as far as getting an input from the user that corresponds to the starting board

alexdavison
Автор

Great video! I wasn't too familiar with queues and sets prior to this video; I think this is a good motivating example of their usefulness : ). Couple of comments:

In the original problem, the minimum number of moves needs to be returned right? All of the hard work is done though, you'd just need to keep track of the minimum so far and continue until all possible board states have been exhausted.

Also, of course the solution is "constant" since you were given a board with specific parameters (2x3). But as you pointed out, something like this would be on the order of (m+n)! for an mxn board.

xaphi
Автор

Thanks for the video. Can you share the solution code?

ujjwalprazapati
Автор

What would be the formula for scoring this game?

lewisgoitia
Автор

Is the 2 by 3 puzzle in a random configuration still solvable or do a few still have to be in specific positions?

nidhisha
welcome to shbcf.ru