"""
As the name BFS suggests, you are required to traverse the graph breadthwise as follows:

    1. First move horizontally and visit all the nodes of the current layer
    2. Move to the next layer

"""