Skip to content

Category Archives: Dynamic Programming

The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….. In… Read More
Given two arrays arr1[] and arr2[] each of size N, the task is to create another array of size N from these two arrays by… Read More
What is Knapsack Problem? Suppose you have been given a knapsack or bag with a limited weight capacity, and each item has some weight and… Read More
Given an array arr[] of size N describing N moves. A player standing at origin (0, 0). In the first move, the player can move… Read More
Given an array A[] with size N, Select a subsequence B = {B[1], B[2], B[3], ………B[N] } of size M from given array A[]  (N… Read More
Given integers, N, L, and R, the task is to find the number of integers in the range L to R that does not contain… Read More
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

Start Your Coding Journey Now!