Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Binary Search Tree and Doubly Linked Listhistorical
Record inorder-traversal and recursive methods for converting a binary search tree into a sorted doubly linked list.
- Construct Binary Tree from Preorder and Inorder Traversalhistorical
LeetCode notes on reconstructing a binary tree from preorder and inorder traversals.
- Kth Node in a Binary Search Treehistorical
Record inorder-traversal methods for finding the kth smallest node in a binary search tree, plus reverse inorder traversal for the kth largest node.
- Binary Tree Preorder, Inorder, and Postorder Traversalhistorical
Notes on implementing preorder, inorder, and postorder traversal of a binary tree.
- Depth of a Binary Treehistorical
Record a recursive method for computing binary-tree depth by taking the greater depth of the left and right subtrees.
- Convert BST to Greater Treehistorical
LeetCode notes on converting a binary search tree to a Greater Sum Tree.
- Print a Binary Tree from Top to Bottomhistorical
Record queue-based level-order traversal for printing binary-tree nodes from top to bottom.
- Validate Binary Search Treehistorical
LeetCode notes on validating a binary search tree with inorder traversal.
- Symmetric Binary Treehistorical
Record a recursive method for determining whether a binary tree is symmetric by comparing mirrored positions in its left and right subtrees.
- Flatten Binary Tree to Linked Listhistorical
LeetCode notes on flattening a binary tree into a linked list in preorder.