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

fix: cover the cases n == 0 and m < n in N_bonacci #2468

Merged
merged 5 commits into from
May 31, 2023

Conversation

vil02
Copy link
Member

@vil02 vil02 commented May 19, 2023

Description of Change

This PR fixes the implementation of N_bonacci, namely the result has always length equal to m and the case of n == 0 is treated correctly.

Additional changes:

  • fef0591 removes unused includes,
  • ce85e26, a3d7134 simplifies test and adds new test cases
  • some minor updates of the comments

Checklist

  • Added description of change
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Fixes a bug in n_bonacci.cpp

@Panquesito7 Panquesito7 added the Improvement improvement in previously written codes label May 27, 2023
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks! 🚀

@Panquesito7 Panquesito7 merged commit 33750ec into TheAlgorithms:master May 31, 2023
@vil02 vil02 deleted the bug_in_n_bonacci_patch branch May 31, 2023 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement improvement in previously written codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants