Crackeree's blog

By Crackeree, history, 5 years ago, In English

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.

Tags #dp
  • Vote: I like it
  • -20
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +17 Vote: I do not like it
»
5 years ago, # |
  Vote: I like it -27 Vote: I do not like it

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

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    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.

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

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