From 037aaeeaa2f31fdf15ac86ea4289fdff67b80c36 Mon Sep 17 00:00:00 2001 From: zhuoqinyue <64182179+zhuoqinyue@users.noreply.github.com> Date: Sat, 25 Feb 2023 11:16:41 -0600 Subject: [PATCH] fix: update the code comment (#386) Co-authored-by: steak-zhuo --- codes/java/chapter_graph/graph_dfs.java | 2 +- codes/python/chapter_graph/graph_dfs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/java/chapter_graph/graph_dfs.java b/codes/java/chapter_graph/graph_dfs.java index 1c542f42..1b6dfbe1 100644 --- a/codes/java/chapter_graph/graph_dfs.java +++ b/codes/java/chapter_graph/graph_dfs.java @@ -43,7 +43,7 @@ public class graph_dfs { System.out.println("\n初始化后,图为"); graph.print(); - /* 深度优先遍历 BFS */ + /* 深度优先遍历 DFS */ List res = graphDFS(graph, v[0]); System.out.println("\n深度优先遍历(DFS)顶点序列为"); System.out.println(Vertex.vetsToVals(res)); diff --git a/codes/python/chapter_graph/graph_dfs.py b/codes/python/chapter_graph/graph_dfs.py index f4a81ed5..febeda94 100644 --- a/codes/python/chapter_graph/graph_dfs.py +++ b/codes/python/chapter_graph/graph_dfs.py @@ -42,7 +42,7 @@ if __name__ == "__main__": print("\n初始化后,图为") graph.print() - # 深度优先遍历 BFS + # 深度优先遍历 DFS res = graph_dfs(graph, v[0]) print("\n深度优先遍历(DFS)顶点序列为") print(vets_to_vals(res))