# Category Archives: Dynamic Programming

Given an array of random numbers. Find the longest increasing subsequence (LIS) in the array. I know many of you might have read recursive and dynamic… Read More
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.  As another example, if the given sequence is “BBABCBCAB”, then the… 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… Read More
What is the 0/1 Knapsack Problem? We are given N items where each item has some weight and profit associated with it. We are also… 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 the dimension of a sequence of matrices in an array arr[], where the dimension of the ith matrix is (arr[i-1] * arr[i]), the task… Read More
Given an integer array of coins[ ] of size N representing different types of currency and an integer sum, The task is to find the number of… Read More
Given an array arr[] where each element represents the max number of steps that can be made forward from that index. The task is to… 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 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 be performed on str1. Find minimum number of edits (operations) required to convert ‘str1’… Read More