okay, i don't have a problem coding the game... that part would be easy. but the problem is to output the lease number of rotations needed to complete the game, so for example...
123 => 413
456 => 526
789 => 789
(rotation of the top left corner)
that's what it should look like after rotations.
now, i did some study, spent some time figuring the facts, and if i'm correct, the number of possible layouts of a 3*3 square is 9 factorial... which is uhmm... 362880. so even if i tried doing all the possible layouts, i wouldn't get the good result cause i have tho have the right sequence of operations... so, as i know nothing about the np-completeness.. (btw. is it?)i figured i better ask here as i really have no idea..