My topic-wise collection of LeetCode problems and solutions
Click on the topic collections to access subtopics, problems, and solutions
- Array scanning
- Backtracking
- Binary search
- Bitwise operation
- Brute force enumeration
- Dynamic programming
- Graph theory
- Greedy
- Mathematics
- Palindrome
- Prefix sums and extrema
- Sliding window
- Two pointers
- Sorting
- String
- Binary lifting
- Case-by-case analysis
- Divide and conquer
- Heuristic optimisation
- Interval operations
- Meet in the middle
- Quick Select
- Deque
- Disjoint set union
- Hashmap
- Linked list
- Priority queue
- QuadTree
- Queue
- Segment tree
- Stack
- Tree
- Trie
- Data structure design
- Averaging from total and count
- Dynamic update of left and right neighbours
- Offline query processing
- Precomputation to answer queries efficiently with delta
- Process in unusual order
- Process multiple vectors together
- Range updates using prefix sum
- Search by iterative bound improvement
- Time reversed simulation
- Unique/duplicate element finding with bizarro algorithms
- Concurrency
- Construction
- Counting elements in array
- Encoding and decoding
- Flattening
- Formatted output
- Integer operations on strings
- Matrix
- Majority element
- Number transformations based on mathematical rules
- Permutations
- Pointers
- Points in 2D plane
- Simple implementation
- Two player games
- Valid subarray counting
- Unique elements in subarray
- All are AC solutions
- Very few will have comments, because I wrote them for myself, often during contests. But raise an issue if you want to understand more about a solution, and I will add an explanation
- There is a small chance that a handful of solutions are not mine, because I sometimes submit solutions that my students ask me to debug. Raise an issue and I will remove it