Algorithm | Leetcode questions by tag
by Botao Xiao
LeetCode by Tag:
Advance
Trie Tree
- 208. Implement Trie (Prefix Tree)
- 648. Replace Words
- 676. Implement Magic Dictionary
- 677. Map Sum Pairs
- 720. Longest Word in Dictionary
- 745. Prefix and Suffix Search
-
[Data structure Trie Tree 字典树](https://seanforfun.github.io/datastructure/2018/11/07/TrieTree.html)
BIT / Segment tree
- 307. Range Sum Query - Mutable
-
[Data structure Binary Index Tree](https://seanforfun.github.io/datastructure/2018/03/03/BinaryIndexTree.html) -
[Data structure Segment Tree](https://seanforfun.github.io/datastructure/2018/03/04/SegmentTree.html)
Monotic stack
- 84. Largest Rectangle in Histogram
- 85. Maximal Rectangle
- 901. Online Stock Span
- 907. Sum of Subarray Minimums
Search
Combination
- 17. Letter Combinations of a Phone Number
- 39. Combination Sum
- 40. Combination Sum II
- 77. Combinations
- 79. Word Search
- 90. Subsets II
- 216. Combination Sum III
- We can speed up the recursion using an index and if we want all elements used once, we need to sort first and in the for loop, we need to remove duplicate values.
Permutation
- 46. Permutations
- 47. Permutations II
- 784. Letter Case Permutation
- 943. Find the Shortest Superstring
- 996. Number of Squareful Arrays
DFS
- 22. Generate Parentheses
- 301. Remove Invalid Parentheses
- 37. Sudoku Solver
- 51. N-Queens
- 52. N-Queens II
- 79. Word Search
- 212. Word Search II
BFS
- 127. Word Ladder
- 126. Word Ladder II
- 752. Open the Lock
- 542. 01 Matrix
- 695. Max Area of Island
- 934. Shortest Bridge
Partition
- 698. Partition to K Equal Sum Subsets
- 93. Restore IP Addresses
- 131. Palindrome Partitioning
- 241. Different Ways to Add Parentheses
- 282. Expression Add Operators
- 842. Split Array into Fibonacci Sequence
Dynamic Programming
- 70. Climbing Stairs
- 746. Min Cost Climbing Stairs
- 303. Range Sum Query - Immutable
- 53. Maximum Subarray
- 121. Best Time to Buy and Sell Stock
- 198. House Robber
- 213. House Robber II
- 309. Best Time to Buy and Sell Stock with Cooldown
- 740. Delete and Earn
- 790. Domino and Tromino Tiling
- 801. Minimum Swaps To Make Sequences Increasing
- 139. Word Break
- 140. Word Break II
- 818. Race Car
- 300. Longest Increasing Subsequence
- 673. Number of Longest Increasing Subsequence
- 72. Edit Distance
- 10. Regular Expression Matching
- 44. Wildcard Matching
- 97. Interleaving String
- 115. Distinct Subsequences
- 583. Delete Operation for Two Strings
- 712. Minimum ASCII Delete Sum for Two Strings
- 322. Coin Change
- 377. Combination Sum IV
- 416. Partition Equal Subset Sum
- 494. Target Sum
- 813. Largest Sum of Averages
- 312. Burst Balloons
- 664. Strange Printer
- 741. Cherry Pickup
- 546. Remove Boxes
- 943. Find the Shortest Superstring
- 980. Unique Paths III
- 996. Number of Squareful Arrays
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 120. Triangle
- 174. Dungeon Game
- 931. Minimum Falling Path Sum
- 85. Maximal Rectangle
- 221. Maximal Square
- 304. Range Sum Query 2D - Immutable
- 688. Knight Probability in Chessboard
- 576. Out of Boundary Paths
- 935. Knight Dialer
Subscribe via RSS