← All freeCodeCamp videos

Learn Dynamic Programming with Animations – Full Course for Beginners

166,683 views 5,499 likes 2026-01-21 1:41:41 Watch on YouTube ↗ freeCodeCamp ↗
Algorithms & Data StructuresDynamic Programming

Chapters (29)

Show the creator's full description
Master the art of Dynamic Programming by learning to break complex challenges into simple, reusable sub-problems. This course features step-by-step animations that bring abstract logic to life, showing you exactly how data flows through tables and recursion trees in real-time. Develop a powerful visual intuition for optimization so you can solve even the toughest algorithmic puzzles with ease. Sheldon created this course. https://algo.monster/dp ❤️ Support for this channel comes from our friends at Scrimba – the coding platform that's reinvented interactive learning: https://scrimba.com/freecodecamp ⭐️ Contents ⭐️ — 0:00:00 Course Introduction and Visual Intuition — 0:00:33 Fundamentals of Dynamic Programming — 0:01:14 The Staircase Problem: Counting Paths — 0:04:13 Implementing Recursive Solutions — 0:06:26 The Inefficiency of Simple Recursion — 0:07:32 Pattern 1: Memoization (Top-Down Approach) — 0:11:39 Pattern 2: Tabulation (Bottom-Up Approach) — 0:14:09 Comparing Memoization vs. Tabulation — 0:16:34 Practice Problem: N-th Tribonacci Number — 0:20:33 Optimization: Min Cost Climbing Stairs — 0:28:56 Constant Transition Pattern and Space Optimization — 0:30:46 Practice Problem: House Robber — 0:34:08 Pattern 3: Grid Problems (2D DP) — 0:34:41 Practice Problem: Unique Paths — 0:39:54 Optimizing Space in Grid Problems — 0:42:37 Practice Problem: Unique Paths II (With Obstacles) — 0:45:19 Pattern 4: Two Sequences — 0:45:47 Practice Problem: Longest Common Subsequence — 0:57:48 Practice Problem: Edit Distance — 1:01:34 Pattern 5: Interval DP — 1:01:46 Practice Problem: Longest Palindromic Subsequence — 1:11:57 Practice Problem: Palindromic Substrings — 1:14:47 Pattern 6: Non-Constant Transition — 1:15:05 Practice Problem: Longest Increasing Subsequence — 1:23:11 Practice Problem: Partition Array for Maximum Sum — 1:27:00 Pattern 7: Knapsack-like Problems — 1:27:14 Practice Problem: Partition Equal Subset Sum — 1:38:04 Practice Problem: Coin Change — 1:41:27 Final Summary and Resources 🎉 Thanks to our Champion and Sponsor supporters: 👾 @omerhattapoglu1158 👾 @goddardtan 👾 @akihayashi6629 👾 @kikilogsin 👾 @anthonycampbell2148 👾 @tobymiller7790 👾 @rajibdassharma497 👾 @CloudVirtualizationEnthusiast 👾 @adilsoncarlosvianacarlos 👾 @martinmacchia1564 👾 @ulisesmoralez4160 👾 @_Oscar_ 👾 @jedi-or-sith2728 👾 @justinhual1290 -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news

Description and video by freeCodeCamp.org. This page is an independent companion view; the video is embedded from YouTube.