code: private int visitAdj(boolean[] visited, int[] result, int p, int v) {
          int n = 0;
          Arrays.fill(visited, false);
          visited[v] = true;
          for (int w : adjList[v]) {
              if (w != p && !visited[w]) {
                  n = visit(visited, result, v, w, n);
              }
          }
          visited[v] = false;
          return n;
      }
docs: Recursively visit 'v' and all vertices adjacent to it (excluding 'p')
  adding all except 'v' to the result array.
  
  @param visited visit flags array, should be cleared before search
  @param result  visited vertices
  @param p       previous vertex
  @param v       start vertex
  @return number of visited vertices