private void dfsUtil(int v, boolean[] visited){
        visited[v] = true;
        System.out.print(v + " ");

        for(int num : adj[v]){
            if(!visited[num]){
                dfsUtil(num, visited);
            }
        }
    }