Skip to content

Category Archives: Dynamic Programming

 Given two arrays arrA[] and arrB[] containing N integers each. Perform the following operation any number of times (possibly zero): Select any index i (0… Read More
Given an array Arr[] of size N and an integer K, the task is to find the length of the shortest subsequence having sum exactly… Read More
Geek has developed an effective vaccine for the Coronavirus and he wants each of the N houses in Geek Land to have access to it.… Read More
It is often considered that writing a publisher in Robot Operating Systems (ROS) is far easier than working with the subscriber. On most accounts, this… Read More
Given two arrays a[] and b[] and an integer K, the task is to find the length of the longest common subsequence such that sum… Read More
Given an integer N, the task is to find the minimum number of steps to obtain N from M (M = 1 initially). In each… Read More
Given a binary sequence of 1‘s and 0‘s. Our task is to remove all 1s from the sequence in minimum cost by below operations. Remove… Read More
In the COVID times, a movie theatre has to follow a Social distance rule where every two seated individuals must have at least 6 feet… Read More
Given two strings A and B, the task is to find the smallest substring of A having B as a subsequence. If there are multiple… Read More
Given an array of string S[] of size N, the task is to find the maximum size of the resultant string formed by adding some… Read More
Given a matrix grid[][] of size M * N where each cell of the matrix denotes the cost to be present on that cell. The… Read More
Given an array arr[] of length N, the task is to remove the minimum number of elements from the array to make it a mountain… Read More
Given an array arr[] of size N and an integer K, one can move from an index i to any other index j such that… Read More
Given a sequence of numbers in the form of a linked list lis. Find the length of the Longest Increasing Subsequence(LIS) of the given Linked… Read More