mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	fix: update the code comment (#386)
Co-authored-by: steak-zhuo <zhuoqinyue@gmail.com>
This commit is contained in:
		@ -43,7 +43,7 @@ public class graph_dfs {
 | 
				
			|||||||
        System.out.println("\n初始化后,图为");
 | 
					        System.out.println("\n初始化后,图为");
 | 
				
			||||||
        graph.print();
 | 
					        graph.print();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* 深度优先遍历 BFS */
 | 
					        /* 深度优先遍历 DFS */
 | 
				
			||||||
        List<Vertex> res = graphDFS(graph, v[0]);
 | 
					        List<Vertex> res = graphDFS(graph, v[0]);
 | 
				
			||||||
        System.out.println("\n深度优先遍历(DFS)顶点序列为");
 | 
					        System.out.println("\n深度优先遍历(DFS)顶点序列为");
 | 
				
			||||||
        System.out.println(Vertex.vetsToVals(res));
 | 
					        System.out.println(Vertex.vetsToVals(res));
 | 
				
			||||||
 | 
				
			|||||||
@ -42,7 +42,7 @@ if __name__ == "__main__":
 | 
				
			|||||||
    print("\n初始化后,图为")
 | 
					    print("\n初始化后,图为")
 | 
				
			||||||
    graph.print()
 | 
					    graph.print()
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # 深度优先遍历 BFS
 | 
					    # 深度优先遍历 DFS
 | 
				
			||||||
    res = graph_dfs(graph, v[0])
 | 
					    res = graph_dfs(graph, v[0])
 | 
				
			||||||
    print("\n深度优先遍历(DFS)顶点序列为")
 | 
					    print("\n深度优先遍历(DFS)顶点序列为")
 | 
				
			||||||
    print(vets_to_vals(res))
 | 
					    print(vets_to_vals(res))
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user