Bro DP takes around 6 months to get good at it …so if you are not able to solve any problems right now then don’t think that you are the only one who is facing this … Keep trying hard
I am trying hard to be a good programer
I think it doesn’t feel so hard when you enjoy it but if you are not enjoying it…yes, you should quit immediately
That’s like me, but with segment trees… Maybe one day I’ll get better at it
Absolutely !
We all face this dp is a hard nut to crack.I would recommmend to first master recursion before jumping into solving dp because recursion is the first step for dp(not always but it gives you a great start).
After that try to understand why do we use dp.For understanding the underlying reason i will be sharing links of few videos which really helped me to think why to use dp.
watch this video to understand how or why dp is used.
And if you think you cant write recursive definition of a program like subset sum or coin change or minimum jumps to reach till end i would recommend you to learn recursion first.
Thanks!
For segment tree solve
CodeChef: Practical coding for everyone
CodeChef: Practical coding for everyone
FLIPCOIN Problem - CodeChef
MULTQ3 Problem - CodeChef
You will be decent at it if you will solve these problems.
This assumes you have solved basic segment tree ques ( range sum query, range min query etc).
Is this for me?, Thanks, but I don’t understand the concept😥. Once i fully understand how it works I’ll be sure to attempt them😀
This is not how segment tree works
See 2-3 videos on youtube about segment tree.
Just pick an easy problem, Copy paste code of segment tree from any resource, try editing it and get an AC (Don’t try to go in depth about how is this working). You’ll need lots of efforts for it. Do this for 2-3 easy problems. Then “try” understanding each and every line of code of segment tree. And then solve the problems given by me.
Even I am feeling the same but I am starting to realise that there is much more to learn. I know that feeling of “want to but can’t solve problems related to dp(maybe some of them)” (in my case even other topics like recursion)… What I am doing to overcome is I am practicing some problems related to dp(or any other topic) and just move on to learn different topics from here
I am doing this because I think rather than perfecting a single topic in few weeks, perfecting many topics in few months is far better. And this frustration of wanting to solve moderate to hard problem is normal for beginners (few months in cp) I guess.
If you say so…, I’ll try at least one question by midnight today.
Bro, Solving DP is the real game.
You are quitting without even playing it.
Errichto has some great videos on YouTube for Dynamic Programming. You can look into his channel.
My icpc team name is " dp_nahi_aati " XD
Dp is the toughest topic in CP IMO.
It needs lots of practice to be decent at it. Don’t lose hopes, you’ll need time to be good at it. Upsolve problems which you can’t solve during contest.
PS: Is still struggle a lot at DP problems.
yup i too get frustrated sometimes but when i look back 1 year back when i just started coding and could’nt even write a bubble sort program and today i can solve dp,trees,graphs ,heap i think eventually one day i would get better at this.Even though i am an ece student not cse and
This is what still keeps me going… Thanks… Looking forward to get better next year
This is better than my strategy. I just picked Sereja and Brackets of cf and tried to solve it for 2-3 days which was quite frustrating, but when I got AC, it was worth it and felt very rewarding.
I think there is no definition to a “good” programmer. You are “good” (based on stars) for me while for you maybe l_returns is “good”.
After all, CP is quite an unsatisfying sport.
So please do not quit. I think if someone can can do something easily, there would be no fun and learning at all.
Getting stuck somewhere and then after doing what you are doing now and then someday looking back and laughing at the past version of yourself and realizing how much you have improved, this is what makes CP worth doing for me.
I’ve solved the last two problems you mentioned. They are Segment Tree + Lazy Propagation . I know segment tree but i sometimes get stuck in lazy propagation implementation
Lazy propagation is just extension of segment tree, Just add one lazy tree.
I don’t remember good examples for lazy propagation right now. Will share here if I can find them.
Hey, @raman_111 thank you for putting up this topic.
Now , if this is your only accnt. i see ur graph has gone up ever since and that’s good right? My max limit is 4th ques. in codechef and 1 on other platforms like codeforces rarely it’s 2. and this is the story of past 5-6months, i feel stuck too… but i’m learning something new everyday and that’s important i guess. Every 5/6* hv been a 3/4* once.
Just don’t quit yet, and post any good resource u find.
Currently this is the one i’m refering , found on this platform: Resource.