My cousin wants me to teach him more about Dynamic Programming to prepare for future CP competitions.
I have had lots of experience with competitive programming, but when asked to teach him, my mind goes blank and I can't come up with a propper roadmap to teach him. He also has the basics of competitive programming down, and he wants me to teach him some intermediate to advanced stuff.
He decided to focus on DP first, and asked me for some documents and problems to solve.
Can you please provide some useful DP techniques, optimizations and some example problems with varying difficulties?
I appreciate all of your help!
Go for the CSES problem set. It has a variety of questions covering a lot of common techniques.
some intermediate to advance topic i know :
1)digit dp
2)dp prefix sum optimization
3)bitmask dp
4)state rotation ideas
5)space optimization in dp
6)game theory (dp)
7) dp + binary search (used in many interval related problems)
where did y learn these
dp open — closed interval trick too, pretty nice trick for certain probs
Say him to Watch Shayan streams for DP , it is good beginner friendly to start