Add Factorial algorithm using recursion#6736
Closed
Ayush41 wants to merge 3 commits intoTheAlgorithms:masterfrom
Closed
Add Factorial algorithm using recursion#6736Ayush41 wants to merge 3 commits intoTheAlgorithms:masterfrom
Ayush41 wants to merge 3 commits intoTheAlgorithms:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6736 +/- ##
============================================
- Coverage 76.80% 76.79% -0.02%
- Complexity 6047 6051 +4
============================================
Files 719 720 +1
Lines 20342 20349 +7
Branches 3940 3941 +1
============================================
+ Hits 15624 15627 +3
- Misses 4127 4130 +3
- Partials 591 592 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds an implementation of the Factorial algorithm using recursion under the
com.thealgorithms.recursionpackage.✅ Summary:
Factorial.javato demonstrate factorial calculation using recursion.FactorialTest.javafor unit testing.🧠 Algorithm Overview:
The factorial of a non-negative integer
nis defined as:Time Complexity: O(n)
Space Complexity: O(n) (recursive stack)
clang-format -i --style=file path/to/your/file.java