Top "Dynamic-programming" questions

Dynamic programming is an algorithmic technique for efficiently solving problems with a recursive structure containing many overlapping subproblems.

Convert string to palindrome string with minimum insertions

In order to find the minimal number of insertions required to convert a given string(s) to palindrome I find …

algorithm dynamic-programming palindrome lcs
Box stacking problem

I found this famous dp problem in many places, but I can not figure out how to solve. You are …

algorithm dynamic-programming
What is a good algorithm for getting the minimum vertex cover of a tree?

What is a good algorithm for getting the minimum vertex cover of a tree? INPUT: The node's neighbours. OUTPUT: The …

algorithm tree dynamic-programming
Longest common subsequence of 3+ strings

I am trying to find the longest common subsequence of 3 or more strings. The Wikipedia article has a great description …

python algorithm dynamic-programming lcs
Building bridges problem - how to apply longest increasing subsequence?

The building bridges problem is stated as follows: There is a river that runs horizontally through an area. There are …

algorithm dynamic-programming
Dynamic programming - Coin change decision

I'm reviewing some old notes from my algorithms course and the dynamic programming problems are seeming a bit tricky to …

algorithm computer-science dynamic-programming
Solving the Integer Knapsack

I a new to dynamic programing and have tried the integer knapsack problem here at SPOJ (http://www.spoj.pl/…

c++ algorithm dynamic-programming knapsack-problem
Find number of bits to be flipped to get maximum 1's in array

We have a bit array like below {1 0 1 0 0 1 0 1} Number of bits in above array is 8 If we take range from [1,5] then …

algorithm bit-manipulation dynamic-programming
Understanding change-making algorithm

I was looking for a good solution to the Change-making problem and I found this code(Python): target = 200 coins = [1,2,5,10,20,50,100,200] ways = [1]+[0]*…

python algorithm dynamic-programming
How to split a string into words. Ex: "stringintowords" -> "String Into Words"?

What is the right way to split a string into words ? (string doesn't contain any spaces or punctuation marks) For …

algorithm nlp dynamic-programming string-split text-segmentation