This site uses JavaScript for navigation, themes, and games like 2048. Please enable JavaScript in your browser settings, then reload the page.
9 problems. Click one to open the details.
0/9 solved
1.Bottom View of Binary Tree
Horizontal distance map; last node at each HD in level order.
2.LCA of Binary Tree
Lowest common ancestor in a general binary tree.
3.Burn Binary Tree from Target
Time to burn tree: BFS on undirected tree graph from target.
4.Construct BT from Preorder & Inorder
Root from preorder; split inorder; recurse.
5.Morris Preorder Traversal
O(1) extra space preorder via temporary threads.
6.Delete Node in a BST
Delete with 0/1/2 children cases.
7.LCA of BST
Walk down using BST order property.
8.Two Sum IV — BST
Find two nodes summing to k (set or two iterators).
9.Largest BST Subtree
Post-order return min/max/size; track largest valid BST.