2b5bbb98ca
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. |
||
---|---|---|
.. | ||
advent-of-code-2019 | ||
crack_the_coding_interview | ||
data_structures_and_algorithms | ||
deepmind | ||
groceries | ||
habit-screens | ||
haskell-programming-from-first-principles | ||
README.md |
Scratch
The purpose of the scratch
directory is to host practice exercises. Practice
encompasses things like working on data structures and algorithms problems for
upcoming coding interviews or general aptitude as well as writing code snippets
to help me learn a new programming language or understand an unfamiliar concept.