about summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-11-21T14·14+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-11-21T14·14+0000
commit2b5bbb98ca791a0c848febd3f02ed81469fef484 (patch)
tree9be17124b46b1b16c214f6ad54d0b18bbff7fefe /emacs
parent1dc6695a47c76adaeb4d28dbd681322e9f02f8e2 (diff)
Refactor existing bst-checker implementation
I believe the previous solution is invalid. This solution works and it should be
more time and space efficient.

Space-wise our stack grows proportionate to the depth of our tree, which for a
"balanced" BST should be log(n). Doing a BFT on a BST results in memory usage of
n because when we encounter the leaf nodes at the final level in the tree, they
will be 1/2 * n for a balanced BST.
Diffstat (limited to 'emacs')
0 files changed, 0 insertions, 0 deletions