Tag Info

New answers tagged

2

This article has an extensive discussion of the solution: http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html The summary for the 3x3 board is: Lay out the board as a 9x1 row (row 1, then row 2, then row 3). Count the number of inversions (pairs of tiles that are out of order on this row compared to the board being in order). ...



Top 50 recent answers are included