code: public void exploreFrom(int root, BitSet visited) {
  		int first = 0;
  		int last = 0;
  		int i = root;
  		fifo[last++] = i;
  		visited.set(i);
  		while (first < last) {
  			i = fifo[first++];
  			for (int j : g.getPotNeighOf(i)) {
  				if (!visited.get(j)) {
  					visited.set(j);
  					fifo[last++] = j;
  				}
  			}
  		}
  	}
docs: ***********************************************************************************