Tutorial 12.4 - Tutorial on pseudocode for recursion and Depth First Search (DFS)
Tutorial 12.4 - Tutorial on pseudocode for recursion and Depth First Search (DFS)
Venkatesh
Department of Computer Science Indian Institute of Technology Madras
Chennai Mathematical Institute
4 3
Input graph
Starting vertex = 1
4 3
Input graph
Current vertex = 1
4 3
Input graph
Current vertex = 1
Neighbour = 2, 4
2
4 3
Input graph
Current vertex = 2
Neighbour = 3, 5
2
4 3
Input graph
Current vertex = 1
3
Neighbour = No
2
4 3
Input graph
Current vertex = 5 5
3
Neighbour = 4
2
4 3
Input graph
Current vertex = 4 5
3
Neighbour = No
2
4 3
Input graph
3 5