minus-squareeskimofry@lemmy.worldtoAsk Lemmy@lemmy.world•Programmers of Lemmy, what are your interviewing horror stories?linkfedilinkarrow-up1·1 day agoNo you just start by marking all nodes as unvisited and perform a search from a random starting node. you store the current bfs set of vertices in a sorted datastructure. Repeat until there are no more unvisited nodes. linkfedilink
No you just start by marking all nodes as unvisited and perform a search from a random starting node. you store the current bfs set of vertices in a sorted datastructure. Repeat until there are no more unvisited nodes.