Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Balanced Binary Treehistorical
Record a method for determining whether a binary tree is balanced by comparing subtree heights and recursively checking both subtrees.
- Lowest Common Ancestor of a Binary Treehistorical
LeetCode notes on finding the lowest common ancestor in a binary tree.
- Mirror of a Binary Treehistorical
Record recursive, stack-based, and queue-based methods for generating the mirror of a binary tree by swapping left and right subtrees.
- Print a Binary Tree in Multiple Lineshistorical
Record a queue-based method that uses end-of-line pointers to print a binary tree level by level, one line per level.
- Lowest Common Ancestor Nodehistorical
Notes on finding the lowest common ancestor of two nodes in a binary tree.
- Print a Binary Tree in Zigzag Orderhistorical
Record a zigzag traversal method by reversing alternating rows after level-order traversal.
- Substructure of a Treehistorical
Record a preorder-recursive matching method for determining whether one binary tree is a substructure of another.