Skip to content

Conversation

@aadislnk
Copy link
Contributor

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

What was changed

  • Added input validation to handle negative input values in the fibonacci method

Why

  • Prevents infinite recursion and potential stack overflow
  • Improves robustness of the utility method

@aadislnk aadislnk marked this pull request as ready for review December 18, 2025 14:51
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.89%. Comparing base (7d51c7f) to head (dae65ce).

Files with missing lines Patch % Lines
...a/com/thealgorithms/recursion/FibonacciSeries.java 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7177      +/-   ##
============================================
- Coverage     78.90%   78.89%   -0.02%     
- Complexity     6857     6858       +1     
============================================
  Files           771      771              
  Lines         22686    22688       +2     
  Branches       4456     4457       +1     
============================================
- Hits          17900    17899       -1     
- Misses         4071     4073       +2     
- Partials        715      716       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@DenizAltunkapan DenizAltunkapan left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @aadislnk

@DenizAltunkapan DenizAltunkapan merged commit 48e02b3 into TheAlgorithms:master Dec 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants