# Category Archives: Dynamic Programming

There is a row of N walls in Geeksland. The king of Geeksland ordered Alexa to color all the walls on the occasion of New… Read More
Given an input array, the task is to convert the given array into an ‘even array’. An even array is an array where every number… Read More
Given an array, arr[] of size N, the task is to find the sum of the at most K non-overlapping contiguous subarray within an arr[]… Read More
Given an array arr[] of integers, the task is to find the length of the second longest increasing subsequence (LIS). Examples: Input: arr[] = {1,… Read More
Given array A[] of size N, array B[] of size M, and integer X, the task for this problem is to tell whether number X… Read More
Given an array arr[], find the maximum sum that can be achieved by picking a subsequence such that the difference between consecutive elements in the… Read More
Given an unweighted directed graph with N vertices and M edges and array A[] of size N. Given Q queries of the form (U, V),… Read More
Given a string S and a set of strings D, the task is to find the minimum number of deletions required to make the string… Read More
Given an array, arr[], and an integer K, the task is to find the total number of ways in which we can divide the array… Read More
Given N and K, the task is to form an array where each element represents the number of ways to reach each index i (1… Read More
Given binary array A[] of size N, the task is to find the minimum cost to remove all elements of the array by performing moves… Read More
Given numbers T, A, and B, the task is to find the greatest number less than equal to T formed by the sum of any… Read More
Given integer N, the task is to count the number of ways( modulo 109 + 7) to create an N digit number from digits 1… Read More
Given the number N, the task for this problem is to find the number of ways of creating an N digit number whose bitwise XOR… Read More
Given a number N, the task is to count the number of ways to create a string of size N (only with capital alphabets) such… Read More