Update dfs solution complexity discussion

This commit is contained in:
Donne Martin
2016-03-02 07:50:28 -05:00
parent de0e70de4f
commit 358791fbbc

View File

@@ -75,7 +75,7 @@
"\n",
"Complexity:\n",
"* Time: O(n)\n",
"* Space: O(h), where h is the height of the tree\n",
"* Space: O(m), where m is the recursion depth, or O(1) if using an iterative approach\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(h), where h is the height of the tree\n",
"* Space: O(m), where m is the recursion depth, or O(1) if using an iterative approach\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(h), where h is the height of the tree\n",
"* Space: O(m), where m is the recursion depth, or O(1) if using an iterative approach\n",
"\n",
"Note:\n",
"* This is a form of a depth-first traversal"
@@ -265,21 +265,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,