Add README.md
for Dynamic Programming Algorithms
#97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This pull request introduces a new
README.md
file to thedynamic_programming
directory. The file provides comprehensive documentation for the dynamic programming algorithms implemented in this directory.Changes Introduced:
README.md
to thedynamic_programming
directory.Details:
coin_change.rs
): Determines the minimum number of coins needed to make a given amount. Time Complexity: O(n * m), wheren
is the amount andm
is the number of coin types.edit_distance.rs
): Calculates the minimum number of operations required to convert one string into another. Time Complexity: O(m * n), wherem
andn
are the lengths of the two strings.egg_dropping.rs
): Determines the minimum number of attempts needed to find the highest floor from which an egg can be dropped without breaking. Time Complexity: O(k * n), wherek
is the number of eggs andn
is the number of floors.fibonacci.rs
): Computes then
th Fibonacci number. Time Complexity: O(n)knapsack.rs
): Solves the problem of selecting items with given weights and values to maximize total value without exceeding the weight capacity. Time Complexity: O(n * W), wheren
is the number of items andW
is the weight capacity.longest_common_subsequence.rs
): Finds the longest subsequence present in both of the given sequences. Time Complexity: O(m * n), wherem
andn
are the lengths of the two sequences.longest_increasing_subsequence.rs
): Finds the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. Time Complexity: O(n^2) with dynamic programming approach.maximum_subarray.rs
): Finds the contiguous subarray within a one-dimensional array of numbers which has the largest sum. Time Complexity: O(n)rod_cutting.rs
): Determines the maximum revenue obtainable by cutting up a rod and selling the pieces. Time Complexity: O(n^2)References:
Motivation:
Adding this README will provide users with a clear understanding of the dynamic programming algorithms included in this directory, their implementations, and their complexities. It will also offer direct links to resources for further study, improving the overall documentation quality of the repository.
Related Issue: