Breadth-first search means we visit all of vertex 's neighbours
before we visit the neighbours' neighbours. One way to achieve this
is to add all of
's neighbours to a queue, and then visit each
element of the queue(adding that element's neighbours to the tail of
the queue) in FIFO order. There is pseudocode for this algorithm in
the Course readings that numbers each vertex with a unique number
according to when it is visited (as does the Readings' DFS algorithm).