Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Dynamic Programming
1.1K+ articles
Searching
1.0K+ articles
Tree
911+ articles
DSA
/
Algorithms
/
Dynamic Programming
Dynamic Programming
1.1K+ posts
Recent Articles
Popular Articles
Maximize score by multiplying elements of given Array with given multipliers
Last Updated: 23 July 2025
Given two arrays array[] and multipliers[] of size N and M where N is always greater than equal to M. There are M operations to be performed. In each operation, choose mul...
read more
Misc
Dynamic Programming
Mathematical
DSA
Arrays
Memoization
Check if given Generic N-ary Tree is Symmetric horizontally
Last Updated: 23 July 2025
Given an N-ary tree root, the task is to check if it is symmetric horizontally (Mirror image of itself).Example:Input: root = 7 / / \ \ ...
read more
Tree
Dynamic Programming
Recursion
DSA
Preorder Traversal
n-ary-tree
Length of Longest Increasing Subsequences (LIS) using Segment Tree
Last Updated: 23 July 2025
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: arr[] = {2, 2, 2, 2, 2}Output:...
read more
Tree
Dynamic Programming
Advanced Data Structure
TrueGeek-2021
DSA
Segment-Tree
LIS
Longest non-decreasing subsequence having difference between adjacent elements less than D
Last Updated: 23 July 2025
Given an array arr[] of N integers and an integer D, the task is to find the length of the longest non-decreasing subsequence such that the difference between every adjace...
read more
Dynamic Programming
Mathematical
DSA
Arrays
subsequence
LIS
Minimum characters to be replaced in Ternary string to remove all palindromic substrings for Q queries
Last Updated: 23 July 2025
Given a ternary string S of length N containing only '0', '1' and '2' characters and Q queries containing a range of indices [L, R], the task for each query [L, R] is to f...
read more
Strings
Dynamic Programming
TrueGeek
TrueGeek-2021
DSA
prefix
Count of non decreasing Arrays with ith element in range [A[i], B[i]]
Last Updated: 03 October 2025
Given two arrays A[] and B[] both consisting of N integers, the task is to find the number of non-decreasing arrays of size N that can be formed such that each array eleme...
read more
Dynamic Programming
Mathematical
DSA
Arrays
array-range-queries
prefix-sum
prefix
Largest value of K that a set of all possible subset-sum values of given Array contains numbers [0, K]
Last Updated: 23 July 2025
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 is present in the set S, where S contains all t...
read more
Dynamic Programming
Greedy
Mathematical
Hash
DSA
Arrays
subset
Check if end of given Binary string can be reached by choosing jump value in between given range
Last Updated: 23 July 2025
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 string is reached from the index 0 by a series of jumps of indi...
read more
Strings
Dynamic Programming
Greedy
Mathematical
DSA
binary-string
Count of subarrays in range [L, R] having XOR + 1 equal to XOR (XOR) 1 for M queries
Last Updated: 23 July 2025
Given an array, arr[] of N positive integers and M queries which consist of two integers [Li, Ri] where1 ? Li ? Ri ? N. For each query, find the number of subarrays in ran...
read more
Dynamic Programming
Mathematical
DSA
Arrays
array-range-queries
Bitwise-XOR
subarray
Minimize cost to sort the Array by moving elements with cost as the value itself
Last Updated: 23 July 2025
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 element to any position such that the cost of ...
read more
Dynamic Programming
Sorting
Mathematical
DSA
Arrays
subsequence
Print the Array formed by reversing the given Array after each index
Last Updated: 23 July 2025
Given an array arr[], the task is to print the array formed by traversing given array from first to the last index by flipping the whole array after printing every element...
read more
C/C++ Puzzles
Dynamic Programming
DSA
Arrays
two-pointer-algorithm
Largest square sub-matrix with equal row, column, and diagonal sum
Last Updated: 23 July 2025
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 rows, columns, diagonals in that submatrix ...
read more
Dynamic Programming
Greedy
Mathematical
Matrix
DSA
prefix-sum
submatrix
Find expected swaps to sort given Array where probability of swapping any inversion pair is equal
Last Updated: 23 July 2025
Given an array arr[] consisting of permutation of the first N natural numbers, the task is to find the expected number of swaps to sort the given array where the probabili...
read more
Dynamic Programming
Sorting
Recursion
DSA
Memoization
Maximize count of indices with same element by pairing rows from given Matrices
Last Updated: 03 October 2025
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 row in the array b[][] such that the total score can...
read more
Bit Magic
Dynamic Programming
Mathematical
Combinatorial
Matrix
DSA
subsequence
permutation
Top 50 Dynamic Programming Coding Problems for Interviews
Last Updated: 23 July 2025
Here is the collection of the Top 50 list of frequently asked interview questions on Dynamic Programming. Problems in this Article are divided into three Levels so that re...
read more
Dynamic Programming
DSA
GFG Sheets
1
...
15
16
17
...
71