Skip to content

Category Archives: Dynamic Programming

Knapsack problems are those problems in which some set of items will be given to us, each with a weight and value and we will… Read More
Given the prices of stock for n number of days. Every ith day tell the price of the stock on that day. Find the maximum… Read More
Given that 2 players are playing a die-throw game. The game is one player throws a die and he got a point, he can move… Read More
Given a singly linked list, the task is to replace every node with its closest bell number. Bell numbers are a sequence of numbers that… Read More
Given a binary tree and a target, find the number of nodes in the minimum sub-tree with the given sum equal to the target which… Read More
Given an array A[] of N numbers, the task is to find the length of the longest valid number that can be formed by connecting… Read More
Given an array arr[] of size N. The task is to find a number of subsets whose product can be represented as a product of… Read More
Given a tree of N vertices numbered from 0 to N-1 and N-1 edges. The task is to minimize the sum of the distance of… Read More
Given three integers n, k, target, and an array of coins[] of size n. Find if it is possible to make a change of target… Read More
Given an integer array A[] of size N and two integers K, D. A list or superset of all possible subset sums of size K… Read More
Given an array arr[] of N elements, the task is to find the length of the longest non-decreasing subsequence such that the differences between adjacent… Read More
There are n activities that a person can perform. Each activity has a corresponding merit point for each of the n days. However, the person… Read More
Given an array arr[], the task is to print the minimum number of operations required to convert the array such that neither two even elements… Read More
Dynamic Programming is defined as an algorithmic technique that is used to solve problems by breaking them into smaller subproblems and avoiding repeated calculation of… Read More
The reliability design problem is the designing of a system composed of several devices connected in series or parallel. Reliability means the probability to get… Read More