Question: Design a fast algorithm to compute (n) ! for large values of (n), using Java's BigInteger class. Use your program to compute the longest run
Design a fast algorithm to compute \(n\) ! for large values of \(n\), using Java's BigInteger class. Use your program to compute the longest run of consecutive \(9 \mathrm{~s}\) in 1000000 !. Develop and validate a hypothesis for the order of growth of the running time of your algorithm.
Step by Step Solution
3.52 Rating (152 Votes )
There are 3 Steps involved in it
In Java you can use the BigInteger class to work with very large integ... View full answer
Get step-by-step solutions from verified subject matter experts
