60 Problems
Dynamic Programming
Master dynamic programming problems with detailed brute force and optimal solutions.
01
Coin Change Problem
Click to view brute force and optimal solutions
02
Knapsack Problem
Click to view brute force and optimal solutions
03
Binomial Coefficient Problem
Click to view brute force and optimal solutions
04
Permutation Coefficient Problem
Click to view brute force and optimal solutions
05
Program for nth Catalan Number
Click to view brute force and optimal solutions
06
Matrix Chain Multiplication
Click to view brute force and optimal solutions
07
Edit Distance
Click to view brute force and optimal solutions
08
Subset Sum Problem
Click to view brute force and optimal solutions
09
Friends Pairing Problem
Click to view brute force and optimal solutions
10
Gold Mine Problem
Click to view brute force and optimal solutions
11
Assembly Line Scheduling Problem
Click to view brute force and optimal solutions
12
Painting the Fence problem
Click to view brute force and optimal solutions
13
Maximize The Cut Segments
Click to view brute force and optimal solutions
14
Longest Common Subsequence
Click to view brute force and optimal solutions
15
Longest Repeated Subsequence
Click to view brute force and optimal solutions
16
Longest Increasing Subsequence
Click to view brute force and optimal solutions
17
Space Optimized Solution of LCS
Click to view brute force and optimal solutions
18
LCS (Longest Common Subsequence) of three strings
Click to view brute force and optimal solutions
19
Maximum Sum Increasing Subsequence
Click to view brute force and optimal solutions
20
Count all subsequences having product less than K
Click to view brute force and optimal solutions
21
Longest subsequence such that difference between adjacent is one
Click to view brute force and optimal solutions
22
Maximum subsequence sum such that no three are consecutive
Click to view brute force and optimal solutions
23
Egg Dropping Problem
Click to view brute force and optimal solutions
24
Maximum Length Chain of Pairs
Click to view brute force and optimal solutions
25
Maximum size square sub-matrix with all 1s
Click to view brute force and optimal solutions
26
Maximum sum of pairs with specific difference
Click to view brute force and optimal solutions
27
Min Cost Path Problem
Click to view brute force and optimal solutions
28
Maximum difference of zeros and ones in binary string
Click to view brute force and optimal solutions
29
Minimum number of jumps to reach end
Click to view brute force and optimal solutions
30
Minimum cost to fill given weight in a bag
Click to view brute force and optimal solutions
31
Minimum removals from array to make max min less than or equal to K
Click to view brute force and optimal solutions
32
Longest Common Substring
Click to view brute force and optimal solutions
33
Count number of ways to reach a given score in a game
Click to view brute force and optimal solutions
34
Count Balanced Binary Trees of Height h
Click to view brute force and optimal solutions
35
Largest Sum Contiguous Subarray [V.V.V.V IMP]
Click to view brute force and optimal solutions
IMP
36
Smallest sum contiguous subarray
Click to view brute force and optimal solutions
37
Unbounded Knapsack (Repetition of items allowed)
Click to view brute force and optimal solutions
38
Word Break Problem
Click to view brute force and optimal solutions
39
Largest Independent Set Problem
Click to view brute force and optimal solutions
40
Partition problem
Click to view brute force and optimal solutions
41
Longest Palindromic Subsequence
Click to view brute force and optimal solutions
42
Count All Palindromic Subsequence in a given String
Click to view brute force and optimal solutions
43
Longest Palindromic Substring
Click to view brute force and optimal solutions
44
Longest alternating subsequence
Click to view brute force and optimal solutions
45
Weighted Job Scheduling
Click to view brute force and optimal solutions
46
Coin game winner where every player has three choices
Click to view brute force and optimal solutions
47
Count Derangements (Permutation such that no element appears in its original position) [IMPORTANT]
Click to view brute force and optimal solutions
IMP
48
Maximum profit by buying and selling a share at most twice [IMP]
Click to view brute force and optimal solutions
IMP
49
Optimal Strategy for a Game
Click to view brute force and optimal solutions
50
Optimal Binary Search Tree
Click to view brute force and optimal solutions
51
Palindrome Partitioning Problem
Click to view brute force and optimal solutions
52
Word Wrap Problem
Click to view brute force and optimal solutions
53
Mobile Numeric Keypad Problem [IMP]
Click to view brute force and optimal solutions
IMP
54
Boolean Parenthesization Problem
Click to view brute force and optimal solutions
55
Largest rectangular sub-matrix whose sum is 0
Click to view brute force and optimal solutions
56
Largest area rectangular sub-matrix with equal number of 1s and 0s [IMP]
Click to view brute force and optimal solutions
IMP
57
Maximum sum rectangle in a 2D matrix
Click to view brute force and optimal solutions
58
Maximum profit by buying and selling a share at most k times
Click to view brute force and optimal solutions
59
Find if a string is interleaved of two other strings
Click to view brute force and optimal solutions
60
Maximum Length of Pair Chain
Click to view brute force and optimal solutions