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

Автор Crackeree, история, 6 лет назад, По-английски

I am very beginner to solve DP problems. For a particular DP problem, I usually kill a lot of time but most of the cases I don't get any idea/solution for that problem. From where I can learn DP for my betterment ? Please suggest some resources/blog/anything. Also give me your valuable suggestion for my improvement in solving DP problems. Thank you.

Теги #dp
  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится
»
6 лет назад, # |
  Проголосовать: нравится -27 Проголосовать: не нравится

Just keep writing such shitty blogs instead of actually practicing. You will surely get the magical trick one day which will make you the best

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

Honestly just approach it like any other topic. Start with the simple stuff and work your way up. There's nothing all that special about DP problems, its just another way of thinking like flow or pathfinding. Remember that complexity is # of states * number of choices. Remember that to be a DP problem things outside your state are irrelevant.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Also, for starting DP problems the most basic formulation is: from this state our answers are always the same. Let's separate a problem into states we can be in and choices (transitions) we can make from each state. It may help to write a brute force solution first to look at how to split out states and transitions.

»
6 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

There are a lot of answers to this question on Quora. I_love_Tanya_Romanova has good answers. Here is one of them.