1
1
# Dynamic-Programming
2
2
A DP a day keeps the bug away.
3
3
4
- ** Cointains Basic Dp Problems** <br ><br >
4
+ ** Cointains Dp Problems** <br ><br >
5
5
6
6
** Parent Problem** : [ * Kadane's Algorithm* ] ( /Kadane.cpp ) <br >
7
7
1 ) [ Best Time to Buy and sell Stock(Leetcode)] ( /Best_Time_To_Buy_And_Sell_Stock_.cpp ) <br >
@@ -59,14 +59,24 @@ SubProblems :<br>
59
59
5 ) [ Maximum Product Increasing Subsequence] ( /Maximum_Product_Increasing_Subsequence.cpp ) .<br >
60
60
6 ) [ Minimum Jumps to reach end] ( /Minimum_Jumps_To_Reach_End.cpp ) .<br >
61
61
7 ) [ Box Stacking Problem] ( /Box_Stacking_Problem.cpp ) .<br >
62
- 8 ) [ Longest Bitonic Sequence] ( /BitonicSequence.cpp ) .<br ><br >
62
+ 8 ) [ Longest Bitonic Sequence] ( /BitonicSequence.cpp ) .<br >
63
+ 9 ) [ Longest Alternating Subsequence] ( /longest_alternating_subsequence.cpp ) <br >
64
+ 10 ) [ Count All Increasing Subsequences] ( /Count_All_Increasing_Subsequences.cpp ) .<br >
63
65
64
66
** Parent Problem** : * DP + Greedy* <br >
65
67
1 ) [ Jump Game-2(Leetcode)] ( /jump_game_2..cpp ) .<br >
66
68
2 ) [ Video Stiching(Leetcode)] ( /video_stiching.cpp ) .<br >
67
- 3 ) [ Minm number of taps to open water] ( /minm_number_of_taps_to_open_water.cpp )
68
-
69
- ** Parent Problem** : [ * Count Distinct SubSequences* ] ( /Count_Distinct_Subsequences.cpp ) <br >
69
+ 3 ) [ Minm number of taps to open water] ( /minm_number_of_taps_to_open_water.cpp ) .<br >
70
+
71
+ ** Parent Problem** : * Game(DP) + minimax* <br >
72
+ 1 ) [ Nim Game] ( /nim_game.cpp ) .<br >
73
+ 2 ) [ Flip Game-1] ( /flip_game.cpp ) .<br >
74
+ 3 ) [ Flip Game-2] ( /flip_game2.cpp ) .<br >
75
+ 4 ) [ Get Minimum Squares] ( /Get_Minimum_Squares.cpp ) .<br >
76
+ 5 ) [ Optimal Strategy to play a Game] ( /Optimal_Strategy_To_Play_A_Game.cpp ) .<br >
77
+ 6 ) [ Stone Game-3] ( /Last_Stone_3.cpp ) <br >
78
+ 7 ) [ Jump Game-3(Leetcode)] ( /Jump_Game_3.cpp ) <br >
79
+ 8 ) [ Jump Game-5(Leetcode)] ( /Jump_Game_5.cpp ) <br >
70
80
71
81
** Parent Problem** : * Dp on Grids* <br >
72
82
1 ) [ Maximum Size Submatrix Square] ( /Maximum_Size_Submatrix_Square.cpp ) .<br >
@@ -76,28 +86,26 @@ SubProblems :<br>
76
86
5 ) [ Path in a Matrix] ( /Max_path_sum.cpp ) <br >
77
87
6 ) [ Maximal Square(Leetcode)] ( /maximal_square.cpp ) <br >
78
88
7 ) [ Count Submatrices with all ones(Leetcode)] ( /count_submatrices_with_all_ones.cpp ) <br >
79
- 8 ) [ Maximum Sum Submatrix] ( /maximum_sum_submatrix.cpp )
89
+ 8 ) [ Maximum Sum Submatrix] ( /maximum_sum_submatrix.cpp ) <br >
90
+ 9 ) [ Unique Path-1] ( /unique_paths_1.cpp ) <br >
91
+ 10 ) [ Unique Path-2] ( /unique_paths_2.cpp ) <br >
92
+
80
93
81
94
** Parent Problem** : [ * Matrix Chain Multiplication* ] ( /Matrix_Chain_Multiplication.cpp ) <br >
82
95
96
+ ** Parent Problem** : [ * Count Distinct SubSequences* ] ( /Count_Distinct_Subsequences.cpp ) <br >
97
+
83
98
** Parent Problem** : * Dp on Trees* <br >
84
99
1 ) [ Max Path Sum] ( /Max_path_sum.cpp ) <br >
85
100
2 ) [ Maximum Path Sum in a Tree from Any node to any other node] ( /Maximum_Path_Sum_in_Binary_tree.cpp ) <br >
86
101
3 ) [ Diameter of a Binary Tree] ( /Diameter_Of_Binary_Tree.cpp ) <br >
87
102
88
103
** Others**
89
- 1 ) [ Get Minimum Squares] ( /Get_Minimum_Squares.cpp ) .<br >
90
- 2 ) [ Count All Increasing Subsequences] ( /Count_All_Increasing_Subsequences.cpp ) .<br >
91
- 3 ) [ Longest Consequetive Subsequences] ( /Longest_Consequetive_Subsequence.cpp ) .<br >
92
- 4 ) [ Optimal Strategy to play a Game] ( /Optimal_Strategy_To_Play_A_Game.cpp ) .<br >
93
- 5 ) [ Zeroes And Ones] ( /zerosAndOnes.cpp )
94
- 6 ) [ Longest Pallidromic SubString] ( /Longest_Pallindromic_Substring.cpp ) .<br >
95
- 7 ) [ Count Pallindromic substring of string] ( /Count_Pallindromic_SubString_Of_String_gfg.cpp ) <br >
96
- 8 ) [ Product of array except self] ( /Count_Pallindromic_SubString_Of_String_gfg.cpp )
97
- 9 ) [ Jump Game-3(Leetcode)] ( /Jump_Game_3.cpp ) <br >
98
- 10 ) [ Jump Game-5(Leetcode)] ( /Jump_Game_5.cpp ) <br >
99
- 11 ) [ Stone Game-3] ( /Last_Stone_3.cpp ) <br >
100
- 12 ) [ Num Products] ( # ) <br >
104
+ 1 ) [ Longest Consequetive Subsequences] ( /Longest_Consequetive_Subsequence.cpp ) .<br >
105
+ 2 ) [ Zeroes And Ones] ( /zerosAndOnes.cpp )
106
+ 3 ) [ Longest Pallidromic SubString] ( /Longest_Pallindromic_Substring.cpp ) .<br >
107
+ 4 ) [ Count Pallindromic substring of string] ( /Count_Pallindromic_SubString_Of_String_gfg.cpp ) <br >
108
+ 5 ) [ Product of array except self] ( /Count_Pallindromic_SubString_Of_String_gfg.cpp )
101
109
102
110
Happy Coding!!
103
111
0 commit comments