Programming, Computer Science, Graph Theory, Graph, Mathematics.
“levels”. It starts at level 1, [1], then goes down to level 2, [1:2, 1:3, 1:4]. When we look at a neighbour we need to see if it’s neighbours have been visited yet. In order to do this we need to “mark” the vertex to signify we haven’t looked at it yet. Advantages Breadth-first search is complete,