Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions about problems that can be solved by combining recursively obtained solutions of subproblems.

Dynamic programming is a technique for building efficient algorithms, in cases where a recursive algorithm might be very slow.

Before asking us to show you how to solve a dynamic programming exercise for you, it may be helpful to refer to our general guidance on strategies for constructing dynamic programming algorithms:

If you're not sure how to solve a dynamic programming exercise, tell us in the question how you've tried to apply those techniques, what you've tried so far, and what progress you've made; this helps us give you better answers.

history | excerpt history