Repository navigation
Should we merge all the factorial algorithms together? #2454
Replies: 2 comments 1 reply
|
Checking whether a number is a factorial is not quite the same as computing factorials (though it could be implemented in terms of computing factorials). Some implementations also seem to differ in whether they are recursive/iterative. I suppose this should be consolidated as follows:
|
1 reply
|
I get the points you made. After considering @appgurueu thoughts, here's a quick solution: Separate methods for factorial checking and calculation. Adding big O performance rating is a good call. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The factorial algorithms are either similar or just various implementations of a single algorithm
now this is not an issue, but it is a bit disorganized.
There are pros and cons to doing such a thing.
pros:
cons:
factorial algorithms
There might be more examples of algorithms in disarray lurking in unexplored directories
All reactions