Longest Common Subsequence
Longest Common Subsequence (LCS) is the problem of finding the longest sequence of elements that appears in the same relative order in two given sequences, without requiring the elements to be contiguous in either one.
7 resources across 4 libraries
Glossary Terms(3)
Sliding Window Maximum
Sliding Window Maximum refers to both a classic algorithmic problem — finding the maximum element in every contiguous window of fixed size k as it slides acros…
Longest Common Subsequence
Longest Common Subsequence (LCS) is the problem of finding the longest sequence of elements that appears in the same relative order in two given sequences, wit…
Knapsack Problem
The Knapsack Problem is a classic optimization problem in which a set of items, each with a weight and a value, must be selected to maximize total value withou…
Study Notes(1)
Cheat Sheets(1)
Interview Questions(2)
How Do You Find the Longest Common Subsequence?
The longest common subsequence (LCS) of two strings is the longest sequence of characters that appears in both strings in the same relative order but not neces…
How Do You Optimize Space in Dynamic Programming?
Dynamic programming space is optimized by noticing that a DP table row (or diagonal) usually only depends on the immediately preceding row, so you can replace…