Wasif_Shahzad's blog

By Wasif_Shahzad, history, 9 months ago, In English

I've solved 9 problems from atcoder dp contest but still I can't even solve basic knapsack problems on my own. I will be really thankful if someone can tell me about any resource from where I can practice dp right from basic to medium difficulty.

Another thing to mention, Most of easy dp problems (1000 +- 200) on codeforces are solvable with other things so I will be very thankful if some problems are told or any resource is told where there is only dp.

Thanks in advance

Tags dp, help
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

refer to the striver dp series on youtube.

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

you can see this blog, it's really helpful.

PS: I suggest to try to solve the easy $$$dp$$$ problems using $$$dp$$$.

  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    one of the problems I get is that I'm unable to formulate dp approach. And mostly, if there's some greedy or brute force tag in the problem as well then mostly the editorial will have those solutions instead of dp. What to do in those cases?

    • »
      »
      »
      9 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Brute force, greedy need more thinking than dp. dp follows some rule. for dp solution, you can check others codes.

    • »
      »
      »
      9 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I think the best way to learn dp is cses problemset. There also have other problems, you can select only dp problems and solve that. I think that it is, if you solve full of that problems, you will able to solve difficult problems on contest. You can find that here

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

tell me about any resource from where I can practice dp right from basic to medium difficulty.

Resource

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Resource Solve some problem from leetcode first.