python4beginners-Hacktoberfest23
python4beginners-Hacktoberfest23 copied to clipboard
Add new code to fix errors in Frog_Jump.py
Two implementations
one using a stack and another using dynamic programming (dp). Both implementations are correct, but the dp implementation is not very efficient. The issue with the dp implementation is that it has a time complexity of O(n^2) in the worst case, making it less efficient for larger inputs.
If you want to improve the efficiency of the dp implementation, you can use a dictionary to store the valid jump sizes for each stone, which will reduce the lookup time.
Thank you for your consideration @wbhoomika