Explain recurrence and Dynamic Programming methods

105 Views Asked by At

Well during competitive programming, Dynamic Programming and Recursion is one of the most favorite topics. It kind of draws the line between an average and a good coder. Now my question is, is there some pattern that is seen when you solve such questions? By this I mean, is there always some specific approach or direction that one should head to when tackling such problems. I see some people are pretty good at making recurrences and things are pretty obvious to them, while to others it's more of a nightmare. Is it just immense practice or have they understood the right idea behind such questions and always approach it in a specific way? Maybe someone could tell me what they feel when they approach such questions. Is there some article that kind of hit them and made things crystal clear in this domain.

I understand that this might be categorized as "Too broad for a question" but I was just hoping if someone could explain how they approach such problems, how do they understand the overlapping problems, how to think of the dp states and intricacies like these.