Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize getFib using DP #13

Merged
merged 2 commits into from
Oct 6, 2021
Merged

Optimize getFib using DP #13

merged 2 commits into from
Oct 6, 2021

Conversation

saranshsaini
Copy link
Contributor

The original getFib implementation ran in O(2^n). This can be fixed using a common DP approach to the problem, to make it run in O(n) and constant space.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saranshsaini for your contribution.

@suryapratapsinghsuryavanshi suryapratapsinghsuryavanshi merged commit a12671c into suryapratapsinghsuryavanshi:main Oct 6, 2021
@saranshsaini saranshsaini deleted the sars branch October 6, 2021 18:44
@suryapratapsinghsuryavanshi suryapratapsinghsuryavanshi linked an issue Oct 6, 2021 that may be closed by this pull request
@saranshsaini saranshsaini restored the sars branch October 6, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide more relative Method
2 participants