Bst
Tree Traversal and Common Techniques
·11 mins
Algorithm
Tree
Binary-Tree
Dfs
Bfs
Bst
DFS return values, BFS level order, BST bounds, climbing to the LCA, tree diameter, and leaf trimming
LeetCode 1008: Construct Binary Search Tree from Preorder Traversal
·3 mins
LeetCode
Medium
Tree
Bst
Binary-Tree
Recursion
LeetCode 1008 note: splitting the array is O(n^2); recursing with an upper bound is O(n)