code: private void visit(int v, int c) {
          remaining--;
          component[v] = c;
          for (int w : g[v])
              if (component[w] == 0) visit(w, c);
      }
docs: Visit a vertex and mark it a member of component {@code c}.
  
  @param v vertex
  @param c component