Mar-28-2024, 04:47 PM
Solve a puzzle by hand, like I did here:
Output:[0, 5, 1, 3, 4, 2] Move 5 to position 1, Already there, no move required.
[0, 5, 1, 3, 4, 2] Move 4 to position 2. 2 is not empty, so move frog from position 2 to the open position
[1, 5, 0, 3, 4, 2] Now move 4 to position 2
[1, 5, 4, 3, 0, 2] Move 3 to position 3. Already there, no move required.
[1, 5, 4, 3, 0, 2] Move 2 to position 4
[1, 5, 4, 3, 2, 0] Move 1 to position 5
[0, 5, 4, 3, 2, 1]
Solve [0, 1, 5, 2, 4, 3] showing the steps and describing the logic for each step.