Dp

Constrained Path DP

Constrained Path DP 1. Overview This document covers DP approaches for path problems with additional …

11 min read

Advanced DP Optimizations

Advanced DP Optimizations 1. Overview This document covers advanced optimization techniques beyond …

12 min read

DP on DAGs / Topological DP

DP on DAGs / Topological DP 1. Overview Core Concept Any DP problem can be viewed as finding paths …

14 min read

String DP

String DP 📚 Summary String DP problems involve comparing, transforming, or matching strings. Common …

15 min read

Interval DP

Interval DP 📚 Summary Interval DP solves problems by considering all possible intervals [i, j] and …

10 min read

Digit Dynamic Programming

Digit DP Summary / TL;DR Digit DP solves problems of the form: “Count numbers in range [L, R] …

12 min read

Bitmask Dynamic Programming

Bitmask DP Summary / TL;DR Bitmask DP uses binary numbers to represent subsets, enabling efficient …

13 min read

Tree DP and Subtree Problems

Tree DP and Subtree Problems Summary / TL;DR Tree DP leverages the hierarchical structure of trees …

13 min read

LIS and Variants

Longest Increasing Subsequence (LIS) and Variants Summary / TL;DR LIS is a fundamental DP problem …

12 min read

Knapsack Variants

Knapsack Variants Summary / TL;DR The Knapsack family of problems involves selecting items with …

14 min read