Skip to content

feat: Add n_bonacci.cpp in math section #1544

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

Merged
merged 10 commits into from
Jul 29, 2021
Merged

feat: Add n_bonacci.cpp in math section #1544

merged 10 commits into from
Jul 29, 2021

Conversation

Swastyy
Copy link
Contributor

@Swastyy Swastyy commented Jul 21, 2021

Description of Change Created n _ bonacci series upto given m number of terms.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • 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 for https://github.com/TheAlgorithms/C-Plus-Plus/projects/6#card-63413779

@Panquesito7 Panquesito7 added the enhancement New feature or request label Jul 21, 2021
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.

Good work! 👍
Please enable GitHub Actions in your repository of this fork in this link: https://github.com/Swastyy/C-Plus-Plus/actions

* @param m is the number of terms in the N-Bonacci sequence
* @returns the n-bonacci sequence as vector array
*/
std::vector<int> N_bonacci(int n, unsigned int m) {
Copy link
Member

Choose a reason for hiding this comment

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

Consider using uint64_t for non-negative values (or their appropriate size: uint32_t, uint16_t, uint8_t) or int64_t for negative values. Check other parts of the code (reference). 🙂

int main() {
test(); // run self-test implementations
return 0;
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}

@Panquesito7 Panquesito7 added requested changes changes have been requested good first issue Good for newcomers labels Jul 21, 2021
Swastyy and others added 4 commits July 22, 2021 07:29
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
@Swastyy Swastyy requested a review from Panquesito7 July 23, 2021 14:32
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.

LGTM. Great work, @Swastyy; thank you! 😄👍🎉

@Panquesito7 Panquesito7 added approved Approved; waiting for merge and removed requested changes changes have been requested labels Jul 25, 2021
@Swastyy
Copy link
Contributor Author

Swastyy commented Jul 29, 2021

@mishraabhinn See this PR has only my file. Check this out.

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.

If nobody has any objections, I'll merge this PR later today.

@Panquesito7 Panquesito7 merged commit a764d57 into TheAlgorithms:master Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants