Welcome to the Dynamic Programming Problems repository! This repository contains solutions and implementations for a variety of dynamic programming problems. Below is a list of problems covered in this repository:
- 0-1 Knapsack: Find the maximum value that can be obtained by including items in a knapsack without exceeding its capacity.
- Unbounded Knapsack: Find the maximum value that can be obtained with an unlimited supply of each item.
- Rod Cutting: Determine the maximum value obtainable by cutting a rod into pieces.
- Subset Sum: Determine if there exists a subset of given numbers that adds up to a specific sum.
- Equal Sum Partition: Determine if a given set can be partitioned into two subsets with equal sum.
- Count Subset with Given Sum: Count the number of subsets with a sum equal to a given value.
- Count Subset with Given Difference: Count the number of subsets whose difference between the subset sums equals a given value.
- Target Sum: Find the number of ways to achieve a target sum using a given set of numbers.
- Coin Change Problem: Determine the minimum number of coins needed to make a given amount.
- Coin Change - 2: Find the number of ways to make a given amount using a set of coins.
- Longest Common Subsequence (LCS): Find the length of the longest common subsequence between two sequences.
- Longest Common Substring (LCString): Find the length of the longest common substring between two strings.
- Shortest Common Supersequence: Find the shortest supersequence that contains both given sequences.
- Longest Palindromic Subsequence (LPS): Find the length of the longest palindromic subsequence in a string.
- Palindrome Partitioning: Partition a string into palindromic substrings and minimize the number of partitions.
- Sequence Pattern Matching: Determine if a pattern exists within a sequence.
- Wildcard Matching: Match a string with a pattern that includes wildcard characters.
- Minimum Insertion/Deletion to Create Palindrome: Find the minimum number of insertions or deletions required to make a string a palindrome.
- Minimum Insertion/Deletion to Create Identical Longest Repeating Subsequence: Modify the string to create a longest repeating subsequence.
- Print All Subsequences: Generate all possible subsequences of a given sequence.
- Matrix Chain Multiplication (MCM): Determine the most efficient way to multiply a chain of matrices.
- Egg Dropping Problem: Find the minimum number of attempts needed to determine the critical floor from which an egg will break.
- Scrambled String: Determine if one string is a scrambled version of another.
- Boolean Expression Evaluation: Evaluate the number of ways a boolean expression can be parenthesized to result in a true value.
- Diameter of Binary Tree: Find the diameter of a binary tree, which is the longest path between any two nodes.
- Maximum Path Sum Between Any Nodes: Find the maximum path sum between any two nodes in a binary tree.
- Maximum Path Sum Between Two Leaves Nodes: Find the maximum path sum between two leaf nodes in a binary tree.
- Maximum Path Sum from Root to Leaf: Find the maximum path sum from the root to any leaf node in a binary tree.
git clone <https://github.com/ayu-ano/Dynamic_Programming-Dp-.git>This repository is licensed under the MIT License. See the LICENSE file for more details.