public boolean dfs(int previous, int current) {
		visited[current] = 1;

		ArrayList<Integer> neighbors = graph.getAdjacenctVertices(current);

		for (int next : neighbors) {
			if (visited[next] == 0) {
				dfs(current, next);
			} else if (next != previous){
				return false;
			}
		}

		visited[current] = 2;
		return true;
	}