# Category Archives: Dynamic Programming

Given an array arr[] of N integers along with integers M, L, R. Consider a variable S(initially 0). The task is to find the maximumâ€¦ Read More
Given an integer N which denotes the size of a matrix, the task is to find the number of possible ways to reach the bottom-rightâ€¦ Read More
Given two arrays A[] and B[], the task is to find the maximum number of uncrossed lines between the elements of the two given arrays.â€¦ Read More
Given an integer N, the task is to find the minimum number of operations needed to obtain the number N starting from 1. Below areâ€¦ Read More
Given an array A[] consisting of N positive integers and an integer K, the task is to find the length of the smallest subarray withâ€¦ Read More
Content Removed For similar problem visit: Partition a set into two subsets such that the difference of subset sums is minimum Recommended Solve DSA problemsâ€¦ Read More
Given an array arr[] consisting of N integers, the task is to print the length of the longest subarray with a positive product. Examples: Input:â€¦ Read More
Given two integers N and M where M and N denote a matrix of dimensions N * M consisting of 0‘s only. The task isâ€¦ Read More
Grammar denotes the syntactical rules for conversation in natural language. But in the theory of formal language, grammar is defined as a set of rulesâ€¦ Read More
Given two integers N and T denoting the number of levels and the number of seconds respectively, the task is to find the number ofâ€¦ Read More
Given an array arr[] of N integers, the task is to find the maximum sum of the array that can be obtained by flipping signsâ€¦ Read More
Given two integers M and N, the task is to find the minimum cost to convert M to N by repetitive addition of even divisorsâ€¦ Read More
Given an integer N, the task is to check if N can be expressed as a sum of integers having 9 as the last digitâ€¦ Read More
Given an array arr[] having N integers. The task is to determine if the array can be partitioned into 3 subsequences of an equal sumâ€¦ Read More
Given a 2D matrix mat[][] of size N*M and Q queries of the form {x1, y1, x2, y2, K}. For each query, the task isâ€¦ Read More