Breadth-First Search on a tree visits all nodes level by level using a queue. Produces level-order traversal and finds the shortest path.
// tap NEXT STEP to walk through one step at a time