Jeff Smith Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server

Using SQL to solve the "Sliding Tiles" puzzle

I just wanted to take a minute to highlight this thread in the sqlteam forums:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=39736

It's really interesting stuff, and a bunch of us worked together to come up with some really cool ideas about using T-SQL  to solve the classic sliding tile puzzle -- you know, where tiles on a square board are mixed up, with one missing, and you slide them around until the picture is complete or they are in the proper order.

Great stuff on this thread, and a great example of why SQLTeam is aptly named.