PegSwap is designed to help you understand how algorithms and linear data structures work
Write out the moves you want to make below then click on the play button next to each move in the table.
Write a move by the indices of the two pegs you want to swap separate by a space
Separate each move with a comma or new line
E.g. 4 3, 2 4 will move the peg at index 4 into the space at index 3 followed by the peg at index 2 into the space at index 4