🌳
Trees
Traversals, depth, paths, BST, ancestors.
01
Traversals
0/16 of 31Inorder, preorder, postorder, level order.
○Inorder TraversalSilver · 1050○Preorder TraversalSilver · 1050○Serialize Tree to Level OrderSilver · 1050○Inorder Traversal ArraySilver · 1050○Preorder Traversal ArraySilver · 1080○Postorder TraversalSilver · 1100○Binary Tree Inorder TraversalSilver · 1100○Binary Tree Preorder TraversalSilver · 1100○Postorder Traversal ArraySilver · 1100○Binary Tree Right Side ViewSilver · 1150○Binary Tree Postorder TraversalGold · 1300○Flatten Tree to Linked ListGold · 1340○Binary Tree Level Order TraversalGold · 1350○Level Order Array of ArraysGold · 1350○Zigzag Level Order TraversalGold · 1380○Kth Smallest in a BSTGold · 1380+ 15 more in the arena →
02
Depth & shape
0/16 of 25Max/min depth, balanced, symmetric, diameter.
○Count NodesSilver · 1000○Count Nodes in Binary TreeSilver · 1000○Same TreeSilver · 1100○Is Height-BalancedSilver · 1200○Count Nodes in RangeSilver · 1200○All Elements in Two BSTsGold · 1320○Invert Binary TreeGold · 1350○Sorted List to Balanced BSTGold · 1360○Invert TreeGold · 1380○Sorted Array to BSTGold · 1400○Merge Two Binary TreesGold · 1400○Invert a Binary TreeGold · 1400○Is the Tree Height-Balanced?Gold · 1410○Symmetric TreeGold · 1450○Balanced Binary TreeGold · 1450○Balance a BST (Return Height)Gold · 1450+ 9 more in the arena →
03
Sums & paths
0/16 of 24Path sum, root-to-leaf, left leaves, good nodes.
○Sum of Left LeavesSilver · 1100○Count LeavesSilver · 1150○Average of LevelsSilver · 1150○Deepest Leaves SumGold · 1300○Has Root-to-Leaf Path SumGold · 1300○Average of Levels in Binary TreeGold · 1300○Count Good NodesGold · 1330○Sum Root to Leaf NumbersGold · 1340○Sum of NodesGold · 1350○Average of Levels ArrayGold · 1350○Path SumGold · 1400○Path Sum IIGold · 1400○Path Sum ExistsGold · 1400○Path Sum II CountGold · 1420○Path Sum CountGold · 1500○Path Sum III CountGold · 1500+ 8 more in the arena →
04
BST
0/6Validate, range sum, kth smallest, LCA in BST.
05
Ancestors & misc
0/6LCA, subtree, cameras, flatten.