# Category Archives: Dynamic Programming

Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the… Read More
Given a rod of length n inches and an array of prices that includes prices of all pieces of size smaller than n. Determine… Read More
Given a sequence, find the length of the longest palindromic subsequence in it.  Become a success story instead of just reading about them. Prepare… Read More
The following is a description of the instance of this famous puzzle involving n=2 eggs and a building with k=36 floors.Suppose that we wish to… Read More
Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.… Read More
The following are the common definitions of Binomial Coefficients.  A binomial coefficient C(n, k) can be defined as the coefficient of x^k in the expansion… Read More
Given a sequence of matrices, find the most efficient way to multiply these matrices together. The problem is not actually to perform the multiplications, but… Read More
Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = {… Read More
Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a… Read More
Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m,… Read More
Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach… Read More
Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m,… Read More
Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m,… Read More
Given two strings str1 and str2 and below operations that can performed on str1. Find minimum number of edits (operations) required to convert ‘str1’… Read More
We have discussed Overlapping Subproblems and Optimal Substructure properties in Set 1 and Set 2 respectively. We also discussed one example problem in Set… Read More