ACME interview question

Code up a breadth first search.