Tree and Graph Tree and graph can be classified under the non linear data structure. Here I have shared few algorithms of tree and graph. Graph algorithms Algorithm for DFS(Depth First Search) graph traversal: Step 1:Define a Stack of size total number of vertices in the graph. Step 2:Select any vertex as starting point for traversal.Visit that vertex and push it on to the Stack. Step 3:Visit any one of the adjacent vertex of the vertex which is at top of the stack which is not visited and push it on to the stack. Step 5:When there is no new vertex to be visit then use back tracking and pop one vertex from the stack. Step 6:Repeat steps 3, 4 and 5 until stack becomes Empty. Step 7:When stack becomes Empty, then produce final spanning tree by removing unused edges from the graph. Algorithm for BFS(Breadth First Search) graph traversal: Step 1:Define a Queue of size total number of vertices in the graph. Step 2:Select any vertex as starting point for traversal.Visit ...