[go: up one dir, main page]

0% found this document useful (0 votes)
119 views9 pages

DP 1

This document provides a summary of various dynamic programming problems categorized by difficulty level - Easy, Intermediate, and Hard. It lists over 100 problems across the categories and provides brief descriptions for many of the problems. It also includes the author's contact information.

Uploaded by

anirudh b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views9 pages

DP 1

This document provides a summary of various dynamic programming problems categorized by difficulty level - Easy, Intermediate, and Hard. It lists over 100 problems across the categories and provides brief descriptions for many of the problems. It also includes the author's contact information.

Uploaded by

anirudh b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Dynamic Programming

Just simplified my experience here…


Hope it goona help you all…
@himanshu_shekhar16
Save this pdf and thanks me later @himanshushekar
Reference taken form GFG, Leetcode, and InterviewBit

Easy :

Ugly numbers

Fibonacci numbers

nth Catalan Number

Bell Numbers (Number of ways to Partition a Set)

Binomial Coefficient

Permutation Coefficient

Tiling Problem

Gold Mine Problem

Coin change problem

Friends Pairing Problem

Subset Sum Problem

Subset Sum Problem in O(sum) space

Moser-de Bruijn Sequence

Newman-Conway Sequence

Find maximum length Snake sequence

Print n terms of Newman-Conway Sequence

Print Fibonacci sequence using 2 variables

Maximum product of an increasing subsequence

Count all subsequences having product less than K

Maximum games played by winner

Maximum path sum in a triangle


Minimum Sum Path in a Triangle

Maximum sum of a path in a Right Number Triangle

Size of The Subarray With Maximum Sum

Maximum sum of pairs with specific difference

Maximum size square sub-matrix with all 1s

Maximum number of segments of lengths a, b and c

Maximum difference of zeros and ones in binary string | Set 2 (O(n) time)

Maximum path sum for each position with jumps under divisibility condition

Maximize the sum of selected numbers from an array to make it empty

Maximum subarray sum in an array created after repeated concatenation

Maximum path sum that starting with any cell of 0-th row and ending with any cell of (N-1)-th row

Min Cost Path

Minimum number of jumps to reach end

Minimum cost to fill given weight in a bag

Minimum sum of multiplications of n numbers

Count number of ways to cover a distance

Number of decimal numbers of length k, that are strict monotone

Different ways to sum n using numbers greater than or equal to m


Intermediate Problems :

Lobb Number

Eulerian Number

Delannoy Number

Entringer Number

Rencontres Number

Jacobsthal and Jacobsthal-Lucas numbers

Super Ugly Number (Number whose prime factors are in given set)

Floyd Warshall Algorithm

Bellman–Ford Algorithm

0-1 Knapsack Problem

Printing Items in 0/1 Knapsack

Unbounded Knapsack (Repetition of items allowed)

Temple Offerings

Egg Dropping Puzzle

Dice Throw Problem

Word Break Problem

Vertex Cover Problem

Tile Stacking Problem

Box-Stacking Problem

Highway Billboard Problem

Largest Independent Set Problem

Partition Problem

Print equal sum sets of array (Partition problem) | Set 1

Print equal sum sets of array (Partition Problem) | Set 2


High-effort vs. Low-effort Tasks Problem

Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming)

Longest Bitonic Subsequence

Printing Longest Bitonic Subsequence

Longest Palindromic Subsequence

Print Longest Palindromic Subsequence

Longest palindrome subsequence with O(n) space

Count of Palindromic substrings in an Index range

Shortest Common Supersequence

Maximum sum alternating subsequence

Longest alternating subsequence

Shortest Uncommon Subsequence

Longest Repeating Subsequence

Count Distinct Subsequences

Count distinct occurrences as a subsequence

Longest Common Increasing Subsequence (LCS + LIS)

Variations of LIS

LCS formed by consecutive segments of at least length K

Printing Maximum Sum Increasing Subsequence

Longest Increasing Odd Even Subsequence

Print all longest common sub-sequences in lexicographical order

Printing Longest Common Subsequence | Set 2 (Printing All)

Length of Longest Balanced Subsequence

Non-decreasing subsequence of size k with minimum sum

Longest Common Subsequence with at most k changes allowed

Weighted job scheduling


Weighted Job Scheduling | Set 2 (Using LIS)

Weighted Job Scheduling in O(n Log n) time

Number of paths with exactly k coins

Minimum number of coins that make a given value

Count number of ways to reach destination in a Maze

Count all triplets whose sum is equal to a perfect cube

Count digit groupings of a number with given constraints

Count all possible walks from a source to a destination with exactly k edges

Count Derangements (Permutation such that no element appears in its original position)

Count total number of N digit numbers such that the difference between sum of even and odd digits is 1

Maximum Product Cutting

Maximum profit from sale of wines

Maximum size subset with given sum

Maximum difference of zeros and ones in binary string

Find maximum sum array of length less than or equal to m

Find Maximum dot product of two arrays with insertion of 0’s

Sub-tree with minimum color difference in a 2-coloured tree

Minimum number of deletions to make a sorted sequence

Minimum cells required to reach destination with jumps equal to cell values

Minimum number of deletions and insertions to transform one string into another

Find minimum adjustment cost of an array

Find if string is K-Palindrome or not | Set 1

Find if string is K-Palindrome or not | Set 2

Find Jobs involved in Weighted Job Scheduling

Find the Longest Increasing Subsequence in Circular manner

Find the longest path in a matrix with given constraints


Find the minimum cost to reach destination using a train

Hosoya’s Triangle

Optimal Strategy for a game

Optimal Binary Search Tree

Number of permutation with K inversions

Largest divisible pairs subset

Sum of average of all subsets

Compute sum of digits in all numbers from 1 to n

Total number of non-decreasing numbers with n digits

Non-crossing lines to connect points in a circle

Dynamic Programming | Building Bridges

Longest Increasing Path in Matrix

Prefix Sum of Matrix (Or 2D Array)


Hard Problems :

Palindrome Partitioning

Word Wrap Problem

Mobile Numeric Keypad Problem

The painter’s partition problem

Boolean Parenthesization Problem

Program for Bridge and Torch problem

A Space Optimized DP solution for 0-1 Knapsack Problem

Matrix Chain Multiplication

Printing brackets in Matrix Chain Multiplication Problem

Number of palindromic paths in a matrix

Largest rectangular sub-matrix whose sum is 0

Largest rectangular sub-matrix having sum divisible by k

Largest area rectangular sub-matrix with equal number of 1’s and 0’s

Maximum sum bitonic subarray

Maximum sum rectangle in a 2D matrix

Maximum Subarray Sum Excluding Certain Elements

Maximum weight transformation of a given string

Collect maximum points in a grid using two traversals

K maximum sums of overlapping contiguous sub-arrays

How to print maximum number of A’s using given four keys

Maximize arr[j] – arr[i] + arr[l] – arr[k], such that i < j < k < l

Maximum profit by buying and selling a share at most k times

Maximum points from top left of matrix to bottom right and return back

Check whether row or column swaps produce maximum size binary sub-matrix with all 1s
Minimum Cost Polygon Triangulation

Minimum cost to sort strings using reversal operations of different costs

Find minimum possible size of array with given rules for removing elements

Minimum number of elements which are not part of Increasing or decreasing subsequence in array

Count ways to increase LCS length of two strings by one

Count of AP (Arithmetic Progression) Subsequences in an array

Count of arrays in which all adjacent elements are such that one of them divide the another

Number of NGEs to the right

Longest Arithmetic Progression

Longest Geometric Progression

Dynamic Programming on Trees | Set-1

Dynamic Programming on Trees | Set-2

All ways to add parenthesis for evaluation

Shortest possible combination of two strings

Check if all people can vote on two machines

Find if a string is interleaved of two other strings

Longest repeating and non-overlapping substring

Probability of Knight to remain in the chessboard

Feel Free to connect with me –


https://www.linkedin.com/in/himanshushekhar16/

You might also like