Top "Dynamic-programming" questions

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

0-1 Knapsack algorithm

Is the following 0-1 Knapsack problem solvable: 'float' positive values and 'float' weights (can be positive or negative) 'float' capacity …

c# algorithm dynamic-programming knapsack-problem
Coin change with limited number of coins

I have written a program for generating subset sum which might be used in this problem which states: Suppose, you …

c algorithm dynamic-programming knapsack-problem coin-change
find a solution to subset sum using dynamic programming

What I want to do I want to find a subset of an array that sums to a target T. …

java algorithm dynamic-programming subset-sum
What is the dynamic programming algorithm for finding a Hamiltonian cycle in a graph?

What is dynamic programming algorithm for finding a Hamiltonian cycle in an undirected graph? I have seen somewhere that there …

algorithm graph cycle dynamic-programming hamiltonian-cycle
Dynamic Programming - making change

I'm having trouble figuring out my last section of code for a Dynamic Coin Changing Problem. I have included the …

java dynamic-programming greedy
Dijkstra's algorithm a greedy or dynamic programming algorithm?

In this post it is described Dijkstras as a greedy algorithm, while here and here it is shown to have …

algorithm dynamic-programming dijkstra greedy
Find the length of the longest valid parenthesis sequence in a string, in O(n) time

My friend ran into a question in an interview and he was told that there is an O(n) solution. …

algorithm language-agnostic dynamic-programming code-complexity
How to implement TSP with dynamic in C++

Recently I asked a question on Stack Overflow asking for help to solve a problem. It is a travelling salesman …

c++ algorithm dynamic-programming traveling-salesman
Longest Common Subsequence

Consider 2 sequences X[1..m] and Y[1..n]. The memoization algorithm would compute the LCS in time O(m*n). Is …

time-complexity dynamic-programming lcs
8-queen problem using Dynamic programming

I am quite confused with idea of implementing 8-queen problem using dynamic programming. It seems it is not possible at …

algorithm dynamic-programming n-queens