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..
gregorynoob 2 Junior Poster in Training
Sky Diploma 571 Practically a Posting Shark
gregorynoob 2 Junior Poster in Training
VernonDozier 2,218 Posting Expert Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
gregorynoob 2 Junior Poster in Training
Sky Diploma 571 Practically a Posting Shark
gregorynoob 2 Junior Poster in Training
Sky Diploma 571 Practically a Posting Shark
peterfosterfca 0 Newbie Poster
AmerJamil -4 Junior Poster in Training
frogboy77 73 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.