Skip to content

Commit 975a61f

Browse files
author
Caitlin Gao
committed
feat(geektime_algo): adjust dfs params
1 parent 7fc0e7f commit 975a61f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rust/31_graph/graph_search.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ impl Graph {
5656
self.draw(&prev, s, t);
5757
}
5858

59-
fn recur_dfs(&self, s: i32, t: i32, visited: &mut Vec<bool>, prev: &mut Vec<i32>, found: &mut bool) {
59+
fn recur_dfs(&self,
60+
s: i32,
61+
t: i32,
62+
visited: &mut Vec<bool>,
63+
prev: &mut Vec<i32>,
64+
found: &mut bool) {
6065
if *found == true { return; }
6166
visited[s as usize] = true;
6267
if s == t {

0 commit comments

Comments
 (0)