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

added improved Fibonacci sequence number finder with dynamic programming #223

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

Damian-crypto
Copy link
Contributor

@Damian-crypto Damian-crypto commented Oct 8, 2024

Implemented a dynamic programming approach to optimize the Fibonacci sequence number finder for improved efficiency.

Copy link

@Ritabrata1080 Ritabrata1080 left a comment

Choose a reason for hiding this comment

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

Please update the copyright year in the files.
Changes LGTM

@Damian-crypto
Copy link
Contributor Author

Damian-crypto commented Oct 13, 2024

@iluwatar please review this PR.
Thanks

README.md Outdated
Comment on lines 1298 to 1315
/**
* Fibonacci series using dynamic programming. Works for larger ns as well.
*
* @param n given number
* @return fibonacci number for given n
*/
public static int fibonacciBig(int n) {
int previous = 0;
int current = 1;
for (int i = 0; i < n - 1; i++) {
int t = previous + current;
previous = current;
current = t;
}

return current;
}

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think this is the correct position in the README.md. Check below, there is already another Fibonacci implementation.

@Damian-crypto Damian-crypto force-pushed the add-improved-fibonacci-dp branch from ac19053 to 92483c3 Compare November 3, 2024 11:27
Copy link

sonarcloud bot commented Nov 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@iluwatar iluwatar merged commit 2205c4f into iluwatar:master Nov 10, 2024
1 check passed
@iluwatar
Copy link
Owner

Looks good! Thank you for the contribution 🎉

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.

3 participants