Mastering Dynamic Programming 2 | How to approach DP problems

preview_player
Показать описание
Let's unravel the magic behind Dynamic Programming and Memoization in coding! 🚀

In this video, I have problem-solving session. I will discuss how to approach DP problems.

Genrally, it has four phases:

1. Definition
2. Base case
3. Update
4. Final answer

In the video, I show you how I use this technique to solve dp problems. I’d be more than happy to hear your comments. Tell me if this approach works for you or not.

Join our fun Discord community ("Competitive Programming Discord Server") to chat more about this!

Don't forget to like, subscribe, and hit the bell for more awesome coding tips! Let's learn and have fun together! 🔔📚

0:00 Intro
0:54 How to approach DP problems
2:46 Solve Chocolate Bar from Codeforces
13:00 Implement Chocolate Bar
21:00 Solve Independent Set from Atcoder
27:10 Implement Independent Set
33:30 Re-explain the approach
34:48 Ask questions and share feedback

Connect with me:
LinkedIn: Shayan Chashm Jahan
TikTok: @Shayan_Academy

Your support means a lot! Join us on Discord, like, and subscribe to learn more cool coding stuff! 🔥✨

#DynamicProgramming #Memoization #CompetitiveProgramming #Codeforces #Algorithm #DP #ProgrammingTutorial #CodingTips #TopDownDP #BottomUpDP #Recursion #TechEducation
Рекомендации по теме
Комментарии
Автор

🔖 MAKE A WILL 🎯 SUBSCRIBE 🧨 and START GROWING! 🥇


Link of the problems I solved:


CPwithShayan
Автор

not only I learned solving a dp problem, but also learned how to not get a TLE when solving such dp problems on CF. Nice!
Thanks for it!

rlm
Автор

Great video, enjoyed alot, getting better understanding of Dp.

AhmedAli-tjxh
Автор

I was Really Searching for some Good Dp! playlist Really lucky to find this playlist ( Learning from the Top coders ) 🔥

VinayakSonar-ok
Автор

A very underrated channel.
Thx for you effort!

jabersh
Автор

Hi shayan, More power to you !
If in any case could you give us some practice problems ? that would be great at end of every video.. similar to it

Shanky_
Автор

Thank you Shayan.You explain any topic scrutinizely which makes it easy for understanding.I would like to know from you that recently I have seen some mixed problem of DP+combinatorics in that case should I solve combinatorics problem separately from any math book or I just need keep practicing on that topic in different online judges to become skillful?

mppgetech.
Автор

Nicely explained....i usually always get stuck in the transition part.. im not able to visualise how it will happen what should be the order of for loops in harder problems.. if possible pls cover that too

shashanktiwari
Автор

you could have made directed graph and then do dfs, in that case you need not check for the parent always. Am i correct?

AYUSHGUPTA-tksd
Автор

can you make a video on how to identify question in which binary search is applied.

sahilsinghtomar
Автор

really high quality video and editing loved it

Ankit-csun
Автор

ty for ur effort . Pls make more vids about dynamic programming

youssefkallala-vhbj
Автор

I have one request if you can also start uploading solutions of CF contest then it'll be really helpful for us

rashidaziz
Автор

Great video🔥🔥🔥Keep it up bro. Btw, can you make some videos about DP optimizations. :>

HuanTran-bfww
Автор

bro it would be great if you make same kind of videos about greedy!

abrarmasumabir
Автор

Nicely explained, btw the discord issue still isn't resolved, if possible change the link again
Btw I always face problem in chosing the correct optimal states and in the transition, how do you identify so easily

AnkanNayak-qzcx