Add dynamic programming solution for Egg Dropping Problem #12066
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.
Describe your change:
Add Dynamic Programming Solution for the Egg Dropping Problem
Brief Overview:
This pull request introduces a new algorithm for solving the Egg Dropping Problem using dynamic programming. The implementation determines the minimum number of attempts required to find the critical floor in a building with a given number of eggs and floors. It includes detailed comments and doctests to validate the functionality of the algorithm.
Description
This pull request introduces a dynamic programming solution for the Egg Dropping Problem, a well-known problem in combinatorial optimization. The goal is to determine the minimum number of attempts required to find the highest floor from which an egg can be dropped without breaking.
Changes Made
egg_dropping()
function to compute the optimal solution using dynamic programming.Checklist: