diff --git a/src/teaching/cse-250/2022fa/slide/16b-GraphExploration.erb b/src/teaching/cse-250/2022fa/slide/16b-GraphExploration.erb index f1f3ef34..98ac5705 100644 --- a/src/teaching/cse-250/2022fa/slide/16b-GraphExploration.erb +++ b/src/teaching/cse-250/2022fa/slide/16b-GraphExploration.erb @@ -459,6 +459,12 @@ def DFSOne(graph: Graph[…], v: Graph[…]#Vertex) } +
+

What's the runtime of DFSOne excluding recursive calls?

+ + $$O(deg(v))$$ +
+

Depth-First Search

@@ -474,7 +480,7 @@ def DFSOne(graph: Graph[…], v: Graph[…]#Vertex) $ = O(\sum_{v \in V} deg(v))$

- $ = O(2 |E|)$ (by rule) + $ = O(\frac{1}{2} |E|)$ (by rule)

$ = O(|E|)$