Concepts5
⚙️AlgorithmIntermediate
Longest Common Subsequence
The Longest Common Subsequence (LCS) between two sequences is the longest sequence that appears in both, not necessarily contiguously.
#longest common subsequence#lcs#string dp+12
⚙️AlgorithmIntermediate
Edit Distance
Edit distance (Levenshtein distance) measures the minimum number of inserts, deletes, and replaces needed to turn one string into another.
#edit distance#levenshtein#dynamic programming+11
⚙️AlgorithmIntermediate
Knapsack Problems
Knapsack problems ask how to pick items under a weight (or cost) limit to maximize value or to check if a target sum is reachable.
#0/1 knapsack#unbounded knapsack#bounded knapsack+12
⚙️AlgorithmIntermediate
Dynamic Programming Fundamentals
Dynamic programming (DP) solves complex problems by breaking them into overlapping subproblems and using their optimal substructure.
#dynamic programming#memoization#tabulation+12
⚙️AlgorithmIntermediate
DP State Design
Dynamic Programming (DP) state design is the art of choosing what information to remember so that optimal substructure can be reused efficiently.
#dynamic programming#dp state#bitmask dp+11