/Dynamic-Programming

A DP a day keeps the bug away.

Primary LanguageC++

Dynamic-Programming

A DP a day keeps the bug away.

Cointains Dp Problems

Parent Problem : Kadane's Algorithm

  1. Best Time to Buy and sell Stock(Leetcode)
  2. Circular Kadane

Parent Problem : Fibonacci.
SubProblems :

  1. Reach a given Score.
  2. Count number of hops.
  3. Count ways to reach n-th stair.
  4. Count Number of Ways to Tile.
  5. Tiling Problem-General.
  6. Maximum Sum Dividing.
  7. Friends Pairing Problem
  8. Maximize the Cutting
  9. Number of Ways to Decode a String

Parent Problem : 0/1 KnapSack Problem
SubProblems :

  1. SubSet Sum.
  2. Equal Sum Partition.
  3. Count of SubSet Sum.
  4. Minimum SubSet Sum Difference.
  5. Count SubSets of given Sum.

Parent Problem : Unbounded KnapSack
SubProblems :

  1. Coin Changing Problem 1(No of ways).
  2. Coin Changing Problem 2(Minimum no of coins).
  3. Rod Cutting Problem.
  4. Minimum Cost to Fill Bag.

Parent Problem : Longest Common SubSequence
SubProblems :

  1. Longest Common SubString.
  2. Shortest Common SuperSequence.
  3. Print LCS.
  4. Minimum Insertions And Deletion to Convert a String.
  5. Longest Repeating SubSequence.
  6. Longest Pallindromic SubSequence.
  7. Edit Distance.
  8. Count All Pallindromic SubSequence.
  9. Minimum Deletion to make string pallindrome.
  10. Count Distinct Occcurences.
  11. Maximum length of pairs.
  12. Minimum Ascii Sum deletion To Make two Strings equal.
  13. Maximum Dot Product of Subsequences(Leetcode).
  14. Uncrossed Lines(LeetCode).

Parent Problem : Longest Increasing Subsequence

  1. Russian Doll Envelope(Leetcode).
  2. Longest Decreasing SubSequence.
  3. Maximum Sum Increasing SubSequence.
  4. Maximum Sum Decreasing SubSequence.
  5. Maximum Product Increasing Subsequence.
  6. Minimum Jumps to reach end.
  7. Box Stacking Problem.
  8. Longest Bitonic Sequence.
  9. Longest Alternating Subsequence
  10. Count All Increasing Subsequences.

Parent Problem : DP + Greedy

  1. Jump Game-2(Leetcode).
  2. Video Stiching(Leetcode).
  3. Minm number of taps to open water.

Parent Problem : Game(DP) + minimax

  1. Nim Game.
  2. Flip Game-1.
  3. Flip Game-2.
  4. Get Minimum Squares.
  5. Optimal Strategy to play a Game.
  6. Stone Game-3
  7. Jump Game-3(Leetcode)
  8. Jump Game-5(Leetcode)

Parent Problem : Dp on Grids

  1. Maximum Size Submatrix Square.
  2. Maximum Path Sum in Triangle.
  3. Minimum Initial Points to Reach Destination.
  4. GoldMine Problem
  5. Path in a Matrix
  6. Maximal Square(Leetcode)
  7. Count Submatrices with all ones(Leetcode)
  8. Maximum Sum Submatrix
  9. Unique Path-1
  10. Unique Path-2

Parent Problem : Matrix Chain Multiplication

Parent Problem : Count Distinct SubSequences

Parent Problem : Dp on Trees

  1. Max Path Sum
  2. Maximum Path Sum in a Tree from Any node to any other node
  3. Diameter of a Binary Tree

Others

  1. Longest Consequetive Subsequences.
  2. Zeroes And Ones
  3. Longest Pallidromic SubString.
  4. Count Pallindromic substring of string
  5. Product of array except self

Happy Coding!!