mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Fixed Big O space complexities.
This commit is contained in:
parent
e50dff94b0
commit
224aef1d47
|
@ -75,7 +75,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: O(log n)\n",
|
"* Space: O(h), where h is the height of the tree\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Note:\n",
|
"Note:\n",
|
||||||
"* This is a form of a depth-first traversal\n",
|
"* This is a form of a depth-first traversal\n",
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: O(log n)\n",
|
"* Space: O(h), where h is the height of the tree\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Note:\n",
|
"Note:\n",
|
||||||
"* This is a form of a depth-first traversal\n",
|
"* This is a form of a depth-first traversal\n",
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: O(log n)\n",
|
"* Space: O(h), where h is the height of the tree\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Note:\n",
|
"Note:\n",
|
||||||
"* This is a form of a depth-first traversal"
|
"* This is a form of a depth-first traversal"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user