mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Fix bst challenge time complexity discussion (#135)
This commit is contained in:
parent
3d49bb1d43
commit
7945ec045d
|
@ -84,7 +84,7 @@
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"\n",
|
"\n",
|
||||||
"* Time: O(h), where h is the height of the tree\n",
|
"* Time: O(h), where h is the height of the tree\n",
|
||||||
" * In a balanced tree, the height is O(nlogn)\n",
|
" * In a balanced tree, the height is O(log(n))\n",
|
||||||
" * In the worst case we have a linked list structure with O(n)\n",
|
" * In the worst case we have a linked list structure with O(n)\n",
|
||||||
"* Space: O(m), where m is the recursion depth, or O(1) if using an iterative approach"
|
"* Space: O(m), where m is the recursion depth, or O(1) if using an iterative approach"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user