Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Find Smallest Letter Greater Than Targethistorical
Find the smallest letter greater than the target in a cyclically ordered character list.
- Queue Reconstruction by Heighthistorical
Sort first and then insert by position to reconstruct a queue described by height and preceding-person counts.
- Largest Numberhistorical
Rearrange non-negative integers so their concatenation forms the largest integer.
- String Permutationshistorical
Generate all string permutations using recursive backtracking, deduplicate them, and sort them lexicographically.
- Top K Frequent Elementshistorical
Find the top K frequent elements using frequency counting with sorting or a min-heap.
- Move Zeroeshistorical
Move all zeroes to the end of the array while preserving the relative order of non-zero elements.