Top "Dynamic-programming" questions

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

Subset sum recursively in Python

I will be happy to get some help. I have the following problem: I'm given a list of numbers seq …

python recursion dynamic-programming memoization subset-sum
How can I compute the number of characters required to turn a string into a palindrome?

I recently found a contest problem that asks you to compute the minimum number of characters that must be inserted (…

algorithm math dynamic-programming recurrence
what is AC means in leetcode, is it algorithm technique like DP?

I found from various online coding forums, there is a technique called "AC", which looks like "Dynamic Programming" or "Back …

dynamic-programming backtracking
Scala Memoization: How does this Scala memo work?

The following code is from Pathikrit's Dynamic Programming repository. I'm mystified by both its beauty and peculiarity. def subsetSum(s: …

scala dynamic-programming memoization
Why mergesort is not Dynamic programming

I have read these words: There are two key attributes that a problem must have in order for dynamic programming …

dynamic-programming
Is this variant of the subset sum problem easier to solve?

I have a problem related to the subset sum problem and am wondering if the differences make it easier, i.…

algorithm dynamic-programming np-complete subset-sum
Gas Station-like Algorithm with minimum cost? Greedy or DP?

I have an array of n service stations D[] on a highway such that D[i] is the distance of …

algorithm dynamic-programming greedy
Is "house coloring with three colors" NP?

Consider the problem described here (reproduced below.) Can some better known NP-complete problem be reduced to it? The problem: There …

algorithm language-agnostic complexity-theory dynamic-programming np
Traceback in dynamic programming implementation of Needleman-Wunsch algorithm

I almost have my needleman-wunsch implementation working but I am confused on how to handle the traceback on a specific …

python algorithm dynamic-programming bioinformatics
Coin Change :Dynamic Programming

The code I have written solves the basic coin change problem using dynamic programming and gives the minimum number of …

c dynamic-programming coin-change