private void cutVertDfs(int vertex, ArrayList<ArrayList<Integer>> adjList, boolean[] isCutVerts) {
		// number of children of vertex
		int numChildren = 0;
		visited[vertex] = true;
		numVerts++;
		low[vertex] = numVerts;
		num[vertex] = numVerts;
		for (Integer neighbor: adjList.get(vertex)) {
			if (!visited[neighbor]) {
				// neighbor is a child of vertex
				numChildren++;
				parents[neighbor] = vertex;
				cutVertDfs(neighbor, adjList, isCutVerts);
				if (vertex == 0) {
					// root
					if (numChildren > 1) {
						isCutVerts[vertex] = true;
					}
					// the below test of low and num is not applicable to root
					continue;
				}
				if (low[neighbor] >= num[vertex]) { // To find bridge, this condition should be strictly greater than
					isCutVerts[vertex] = true;
				}
				/*
				 * If neighbor or any node in its subtree has a back to vertex's ancestors,
				 * vertex, as neighbor's parent, has the same property.
				 */
				low[vertex] = Math.min(low[vertex], low[neighbor]);
			}
			else {
				if (neighbor != parents[vertex]) {
					// neighbor is vertex's ancestor. (vertex, neighbor) is a back edge
					low[vertex] = Math.min(low[vertex], num[neighbor]);
				}
			}
		}
	}