Блог пользователя Wasif_Shahzad

Автор Wasif_Shahzad, история, 8 месяцев назад, По-английски

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

Теги dp, help
  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
8 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

refer to the striver dp series on youtube.

»
8 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

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

  • »
    »
    8 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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?

    • »
      »
      »
      8 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

    • »
      »
      »
      8 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      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

»
8 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

Resource

»
8 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Resource Solve some problem from leetcode first.