# Category Archives: Dynamic Programming

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
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears inâ€¦ Read More
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears inâ€¦ Read More
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears inâ€¦ Read More
Given two strings, S1 and S2, the task is to find the length of the longest subsequence present in both of the strings.  Note: Aâ€¦ Read More
The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of theâ€¦ Read More