(int v)
| 51 | // It uses recursive |
| 52 | // DFSUtil() |
| 53 | void DFS(int v) |
| 54 | { |
| 55 | // Mark all the vertices as |
| 56 | // not visited(set as |
| 57 | // false by default in java) |
| 58 | boolean visited[] = new boolean[V]; |
| 59 | |
| 60 | // Call the recursive helper |
| 61 | // function to print DFS |
| 62 | // traversal |
| 63 | DFSUtil(v, visited); |
| 64 | } |
| 65 | |
| 66 | // Driver Code |
| 67 | public static void main(String args[]) |