# Category Archives: Dynamic Programming

Given two positive integers L and R and a binary string S of size N, the task is to check if the end of the… Read More
Given an array arr[] of N integers, the task is to find the maximum count of K, i.e, consecutive integers from 0 to K, that… Read More
Given an array arr[] of size N, the task is to count the number of longest increasing subsequences present in the given array. Example: Input:… Read More
Given two integers A and B, the task is to convert the given two integers to zero at minimal cost by performing the following two… Read More
In Ball Sort Puzzle game, we have p balls of each colour and n different colours, for a total of p×n balls, arranged in n… Read More
Given an adjacency matrix graph[][] of a weighted graph consisting of N nodes and positive weights, the task for each connected component of the graph… Read More
Given an array arr[] of N distinct integer, the task is to find the minimum number of jumps required from the largest element to reach… Read More
Given an undirected, connected tree with N nodes valued from 0 to N – 1 and an array edges[] represents the edges between two nodes,… Read More
Given two 2D binary arrays, a[][] and b[][] both of size M*N, the task is to pair each row in the array a[][] with any… Read More
Given a matrix mat[][] of dimensions N*M, the task is to find the size of the largest square submatrix such that the sum of all… Read More
Given an array arr[] of N positive integers, the task is to find the minimum cost to sort the given array by moving an array… Read More
Given an array arr[] of N integers, the task is to maximize the sum of selected numbers over all the operations such that in each… Read More
Given an undirected unweighted graph of N vertices in the form of adjacency matrix adj[][], the task is to find the number of simple cycles… Read More
Given an array arr[] consisting of N integers, the task is to maximize the sum of the difference of the maximum and minimum in each… Read More
Recommended Solve DSA problems on GfG Practice. Solve Problems My Personal Notes arrow_drop_up Save