Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadd BigInteger implementation to Factorial.java #1683
Conversation
|
The BigInteger implementation seems to be a proper one |
|
@ShivamShekhar1997 Is the issue is still open and if yes can you tell me what needs to be done? |
No @sanjana1604 I guess the implementation is a good one and I don't see the need of any changes, just needs to be merged, thanks anyways! |
|
If the PR is valid please get it merged, thank you! |
Describe your change:
The previous implementation of Math/Factorial.java involved usage of
longdatatypes that have large storage, but it cannot even handle 100 factorial. So to solve this, I have implemented the algorithm usingjava.math.BigIntegerwhich can store values upto 2^32-1 digits.BigInteger Oracle Documentation
References
Issue #1682 - Add BigInteger Implementation to Factorial.java
Checklist: