All pastes #410709 Raw Edit

Stuff

public java v1 · immutable
#410709 ·published 2007-03-26 16:39 UTC
rendered paste body
public void bFirstSearch(UndirectedGraph g, int start) {        boolean[] visited = new boolean[g.numVertices()];        LinkedList queue = new LinkedList();        queue.add((int) start);        int i = 0;                                 while(!queue.isEmpty()) {            int x = queue.getFirst();            VertexIterator vi = g.adjacentVertices(x); //Alla grannar till första elementet i kön.                              }