
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Dynamic programming optimizes recursive solutions by solving smaller subproblems and caching results. It leverages optimal substructure and overlapping subproblems, with top-down memoization and bottom-up tabulation approaches.
Explore recursion basics, base and recursive cases, and how a function calls itself, while noting the call stack, recursion tree, overlapping subproblems, and dynamic programming for fib optimization.
Explore top-down dynamic programming, using a memoization lookup table to store fib subproblem results and avoid recomputation with hash table keys. Learn O(n) time and O(n) space characteristics.
Master the bottom-up approach (tabulation) to dynamic programming by building a dp table, solving fib(n) iteratively, and optimizing time and space from O(n) to O(1).
Compare top-down memoization with bottom-up tabulation by weighing ease of implementation, space, and performance. Use memoization to avoid unnecessary subproblems and stack overflow, otherwise prefer tabulation.
Learn to model recursive calls with a directed acyclic graph to reveal overlapping subproblems in Fibonacci, showing how each unique call maps to a subproblem and guides bottom-up table design.
Learn to solve the minimum cost path in a matrix with dynamic programming, moving right or down, using top-down and bottom-up approaches and space optimization.
Apply the dynamic programming technique to problems with optimization goals by identifying optimal substructure and overlapping subproblems, formulating a recurrence, and choosing top-down or bottom-up approaches.
Explore dynamic programming for the paths in a matrix problem, counting routes from the top-left to bottom-right while avoiding walls (1s) by moving right or down. The lesson demonstrates recursive, memoization, and tabulation approaches, shows space optimizations to O(m) or O(min(n,m)), and analyzes O(nm) time.
Learn to solve the house robber problem with dynamic programming, using recursion and memoization to maximize non-adjacent steals. Apply tabulation and space optimization to achieve O(n) time and O(1) space.
Master the longest common subsequence problem for two strings using dynamic programming, with memoization and tabulation to achieve O(nm) time and O(nm) space, plus O(m) space optimization.
Explore the gold mine problem with dynamic programming, building a dp table and using recursion, memoization, and tabulation to compute the maximum gold path from top to last row.
Explore the Levenshtein edit distance between two words and learn dynamic programming approaches—recursion with memoization and bottom-up tabulation—using insertions, deletions, and substitutions.
Learn how dynamic programming solves the ways to climb problem by counting ways to reach step n with a given jump set, using memoization and tabulation.
WARNING: The instructor is not currently available to answer questions regarding this course
Dynamic programming is one of the most important and powerful algorithmic techniques that can be used to solve a lot of computational problems, it's a fundamental technique to learn to strengthen your algorithms and problem solving skills
But, a lot of students find hard times understanding dynamic programming and being able to apply it to solve problems, if you are in this situation, this course is made for you!
Why you should take this course:
Covers all what you need to know to start using dynamic programming to solve problems (introduction, recursion, how to recognize a dynamic programming problem, memoization, tabulation...)
Shows you a technique to solve almost any dynamic programming problem
Has an active instructor that is ready to answer to your questions and doubts in case you don't understand something
Explains the time and space complexity analysis of each solved problem
Includes 20 different interesting dynamic programming problems to practice on with the ability to test your Python solution on different test cases before watching the solution
Practice problems are:
Paths in matrix
House robber
Longest common subsequence
Gold mine
Edit distance
Ways to climb
Shortest common supersequence
Coin change
0-1 Knapsack
Subset sum
Longest increasing subsequence
Ways to decode
Rod cutting
Interleaving string
Square matrix of ones
Partition problem
Sorted vowel strings
Minimum cost for tickets
Word break
Matrix chain multiplication
If you have any other question concerning this course that you want to ask before enrolling, you can send me a message on Instagram at @inside.code
Enjoy!