Skip to content

Category Archives: Dynamic Programming

Given the number N, the task is to count a number of ways to create a number with digit size N with the sum of… Read More
Given a number N and string S, count the number of ways to create a binary string (containing only ‘0’ and ‘1’) of size N… Read More
Given two arrays a[] and b[][2] with both having size N. N operations have to be performed, and initially counter will be 0. Additionally, there… Read More
Given an array arr[] containing N elements, each element is between 0 to 9. The task is to count the number of ways modulo 109… Read More
Given an array A[] of size N (where N is even), Local maxima are array elements strictly greater in value than its adjacent elements i.e.,… Read More
Given two arrays A[] and B[] both of size N, the task is to count the number of non-decreasing arrays C[] of size N such… Read More
Given array A[] and B[] both having size N. Select minimum number indexes so that sum of elements from A[] on those indexes and the… Read More
Given array A[] and B[] of size N representing N type of operations. Given a number H, reduce this number to less than equal to… Read More
Given an array arr[][] of size N*3 where ith element represents that at time arr[i][0] secs, arr[i][2] coins appear at coordinate arr[i][1]. A player starts… Read More
Given the number N, count the number of ways to create a binary string (the string that contains characters as zero or one) of size… Read More
Given an array arr[] of size N, the task is to find the maximum sum of a subset of the array such that the sum… Read More
Given a tree with N node and N-1 edges and an array arr[] where arr[i] denotes the value of ith node, the task is to find… Read More
Jon and Arya are playing a game. The rules of the game are as follows: They have a single number N initially. Both will play… Read More
Given two integer arrays A[] and B[] of length N and M respectively, the task is to find the minimum number of operations required such… Read More
Given a string S and a positive integer K, The task is to maximize the product of the length of non-overlapping palindromic substrings each of… Read More

Start Your Coding Journey Now!