>RunTimeFix
BookStudyPracticeInterviewsYouTubeCoursesAbout
Log inGet Started
Topics/Dynamic Programming
intermediate level

Dynamic Programming

Quick Answer

What is Dynamic Programming?

Dynamic programming (DP) is a method for solving problems by breaking them into overlapping subproblems and caching their results. The key insight is recognizing when a problem has *optimal substructure* (the optimal solution contains optimal solutions to subproblems) and *overlapping subproblems* (the same subproblems recur). RunTimeFix teaches DP through a systematic recipe: define the state, write the recurrence, identify the base cases, and decide between top-down memoization and bottom-up tabulation. We cover classic problems like longest increasing subsequence, knapsack variants, and bitmask DP — each explained with correctness proofs and complexity analysis.

  • dynamic programming
  • DP
  • memoization
  • tabulation
  • knapsack
  • LIS
  • bitmask DP
  • optimal substructure

Study Material for Dynamic Programming

Ch 26: Dynamic Programming — Foundations

The DP Paradigm · The DP Recipe · Classic DP Problems · Longest Increasing Subsequence (LIS) · Maximum Subarray Sum (Kadane's Algorithm)

Ch 27: Dynamic Programming — Knapsack & Subsets

The 0-1 Knapsack Problem · Unbounded Knapsack · Subset Sum & Knapsack Variants · Bitmask DP

Ch 28: Backtracking & Meet-in-the-Middle

The Backtracking Template · Generating Combinatorial Objects · Pruning · Meet-in-the-Middle

Related Topics

Competitive ProgrammingGreedy AlgorithmsGraphs & Graph Algorithms
Was this helpful?

Published by RunTimeFix · Comprehensive guides for competitive programming

>RunTimeFix

Practical programming education. Books, videos, courses, and hands-on learning for competitive programming, DSA, and software engineering.

RunTimeFix

  • About
  • YouTube
  • Book
  • Study Library
  • Courses

Learn

  • Competitive Programming
  • DSA
  • Development
  • Databases

Legal

  • Privacy
  • Terms
  • Refund Policy

RunTimeFix — debug → solve → run

© 2026 RunTimeFix. All rights reserved.