From 224aef1d47bffc6a89b949865fbdf6f0b5fa81f6 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Thu, 13 Aug 2015 06:52:15 -0400 Subject: [PATCH] Fixed Big O space complexities. --- graphs_trees/tree_dfs/dfs_solution.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphs_trees/tree_dfs/dfs_solution.ipynb b/graphs_trees/tree_dfs/dfs_solution.ipynb index 1384bad..9181359 100644 --- a/graphs_trees/tree_dfs/dfs_solution.ipynb +++ b/graphs_trees/tree_dfs/dfs_solution.ipynb @@ -75,7 +75,7 @@ "\n", "Complexity:\n", "* Time: O(n)\n", - "* Space: O(log n)\n", + "* Space: O(h), where h is the height of the tree\n", "\n", "Note:\n", "* This is a form of a depth-first traversal\n", @@ -88,7 +88,7 @@ "\n", "Complexity:\n", "* Time: O(n)\n", - "* Space: O(log n)\n", + "* Space: O(h), where h is the height of the tree\n", "\n", "Note:\n", "* This is a form of a depth-first traversal\n", @@ -101,7 +101,7 @@ "\n", "Complexity:\n", "* Time: O(n)\n", - "* Space: O(log n)\n", + "* Space: O(h), where h is the height of the tree\n", "\n", "Note:\n", "* This is a form of a depth-first traversal"