This series of videos are focused on explaining dynamic programming by illustrating the application of digit DP through the use of selected problems from platforms like Codeforces, Codechef, SPOJ, CSES and Atcoder.
After going through this series, you should find yourself confident in solving problems which require the use of digit dp and also implementing them in a reasonable amount of time.
I will also live code and submit the solutions to the problem on the coding platform from where the problem comes.
Some Basic elements of Dynamic Programming
Some general ideas and my thoughts about DP to help you get started:
Part 1: https://youtu.be/24hk2qW_BCU
1. What is Divide and Conquer?
2. What is Dynamic Programming?
3. Types of DP problems.
Part 2: https://youtu.be/yfgKw6BUZUk
1. What is a DP-state?
2. Characterizing a DP-state.
3. What is a recurrence?
4. Top Down v/s Bottom Up.
Part 3: https://youtu.be/X-3HklSPx6k
1. Directed Acyclic Graph(DAG) Representation of DP solution
2. Visualizing Top-Down and Bottom-Up.
3. Evaluation order for bottom-up codes.
4. Analyzing the space and time complexity for a DP solution(derivation).
Introduction to Digit DP
I discuss the following concepts in this video:
- What exactly is Digit DP?
- What are the types of problems I can solve with Digit DP?
- Discussing a sample problem and it's brute force solution.
- Building up an intuition towards a DP based solution.
- Further discussing another concept required for solving Digit DP problems.
- Coding the solution which we came up with.
video link: https://youtu.be/heUFId6Qd1A
Google Kick Start Round H 2020: Boring Numbers
SPOJ: Digit Sum
Codechef long: Encoding
CSES: Counting Numbers
Will be adding more videos soon!
Hope people find this helpful :)
UPD: added spoj digit sum and codechef enocding. This is the last video for this series(at least for now) unless there are many people who want more.
UPD: added solution to standard digit dp problem from CSES, namely counting numbers.