http://coursera.cs.princeton.edu/algs4/assignments/8puzzle.html