Skip to content

Conversation

@koushik-sai
Copy link
Contributor

  • Added a recursive implementation of factorial in the recursion package
  • Followed utility-class pattern used across the repository
  • Included JUnit tests for base cases, positive input, and negative input

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.89%. Comparing base (48e02b3) to head (0bc3398).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7178      +/-   ##
============================================
- Coverage     78.90%   78.89%   -0.01%     
- Complexity     6858     6862       +4     
============================================
  Files           771      772       +1     
  Lines         22688    22697       +9     
  Branches       4457     4459       +2     
============================================
+ Hits          17901    17906       +5     
- Misses         4072     4073       +1     
- Partials        715      718       +3     

☔ 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.

@DenizAltunkapan
Copy link
Member

DenizAltunkapan commented Dec 19, 2025

there already exists a recursive implementation @koushik-sai https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/maths/FactorialRecursion.java .
Would you suggest moving the existing class into the recursive package?
If so, please move it there and remove your implementation.

@koushik-sai
Copy link
Contributor Author

Thanks for the suggestion 👍
I’ve moved the existing FactorialRecursion from the maths package to the recursion package, removed the duplicate implementation introduced in this PR, updated the corresponding tests, and applied clang-format. All tests pass locally.

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