Breadth First Search:
You should get Java
The animation
instructions