The input should be a directed graph in compressed sparse row (CSR) format. The result include level, parent, discover, and finish. Level is a list, which shows the final distance level to the source vertex. Parent is a list, which shows the parent vertex of every vertex in the BFS. Discovery shows when a vertex is discovered in the BFS. Finish shows when all one-hop children vertices of a vertex are processed.