Dynamic Programming Patterns

Classic problems solved with dynamic programming.

  • Algorithms
  • 16 entries
  • 8 sections
  • CC0 — public domain

The data

0

Problem
Fibonacci
Description
Compute nth Fibonacci using memoization or tabulation.

1

Problem
0/1 Knapsack
Description
Select items to maximize value without exceeding capacity.

2

Problem
Longest Common Subsequence
Description
Find longest subsequence present in two sequences.

3

Problem
Longest Increasing Subsequence
Description
Find longest strictly increasing subsequence.

4

Problem
Coin Change
Description
Minimum coins needed to make a target amount.

5

Problem
Matrix Chain Multiplication
Description
Optimal parenthesization for multiplying matrices.

6

Problem
Edit Distance
Description
Minimum operations to convert one string to another.

7

Problem
Maximum Subarray
Description
Contiguous subarray with the largest sum.

Fetch the same bytes

The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.

curl "https://yjtoon.com/api/dataset/dynamic-programming-patterns?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/dynamic-programming-patterns.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • algorithms
  • dynamic-programming
  • optimization