@Jitendra but that's no fun [?] ----- Anil
On Mon, May 3, 2010 at 5:12 PM, vignesh radhakrishnan < rvignesh1...@gmail.com> wrote: > @siddharth and prasoon either design a very long integer library yourself, > or use gmp library in cpp or BigInteger Class in java. > > Regards, > vignesh > > On 3 May 2010 09:46, siddharth srivastava <akssps...@gmail.com> wrote: > >> But is there any way to accomplish this without an array ? Even for 100!. >> >> >> On 2 May 2010 06:15, Prasoon Mishra <prasoonbluel...@gmail.com> wrote: >> >>> I think challenge here is not the Execution time, but the storage. 300 ! >>> or 400! should generally go beyond the storage capabilities of long long >>> ints in cpp. >>> @ Rohit Saraf: Hence, I don't know if even tail recursion will ultimately >>> be able to store the output. >>> I think Rajesh Patidar's answer fits the bill well, in terms of storage. >>> >>> >>> On Sun, May 2, 2010 at 2:23 PM, vignesh radhakrishnan < >>> rvignesh1...@gmail.com> wrote: >>> >>>> I agree with abhijith. But given some very large x for which i would >>>> have to find factorial. >>>> I would either >>>> (i) use gmp in cpp or BigInteger or java if its not a lab exercise or an >>>> interview >>>> (ii) use simple brute multiplication algorithm. >>>> The second approach requires >>>> (a) The no. of digits in n! for making storage available >>>> (b) The calculation itself which I would brute force >>>> >>>> References: >>>> >>>> http://inder-gnu.blogspot.com/2009/08/find-number-of-digits-in-factorial-of.html >>>> >>>> http://stackoverflow.com/questions/1113167/can-one-know-how-large-a-factorial-would-be-before-calculating-it >>>> http://delphiforfun.org/programs/big_factorials.htm >>>> >>>> >>>> >>>> On 2 May 2010 13:59, Rohit Saraf <rohit.kumar.sa...@gmail.com> wrote: >>>> >>>>> google it... u will gt it >>>>> >>>>> i am on mobile... cannot explain now.. >>>>> >>>>> On 5/2/10, divya jain <sweetdivya....@gmail.com> wrote: >>>>> > wat is tail recursion plz explan in detail >>>>> > >>>>> > On 2 May 2010 08:15, Rohit Saraf <rohit.kumar.sa...@gmail.com> >>>>> wrote: >>>>> > >>>>> >> @divya use tail recursion and rest should be fine.. >>>>> >> >>>>> >> -- >>>>> >> -------------------------------------------------- >>>>> >> Rohit Saraf >>>>> >> Second Year Undergraduate, >>>>> >> Dept. of Computer Science and Engineering >>>>> >> IIT Bombay >>>>> >> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14> >>>>> <http://www.cse.iitb.ac.in/%7Erohitfeb14> >>>>> >> >>>>> >> -- >>>>> >> You received this message because you are subscribed to the Google >>>>> Groups >>>>> >> "Algorithm Geeks" group. >>>>> >> To post to this group, send email to algoge...@googlegroups.com. >>>>> >> To unsubscribe from this group, send email to >>>>> >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>>>> <algogeeks%2bunsubscr...@googlegroups.com<algogeeks%252bunsubscr...@googlegroups.com> >>>>> > >>>>> >> . >>>>> >> For more options, visit this group at >>>>> >> http://groups.google.com/group/algogeeks?hl=en. >>>>> >> >>>>> >> >>>>> > >>>>> > -- >>>>> > You received this message because you are subscribed to the Google >>>>> Groups >>>>> > "Algorithm Geeks" group. >>>>> > To post to this group, send email to algoge...@googlegroups.com. >>>>> > To unsubscribe from this group, send email to >>>>> > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>>>> . >>>>> > For more options, visit this group at >>>>> > http://groups.google.com/group/algogeeks?hl=en. >>>>> > >>>>> > >>>>> >>>>> >>>>> -- >>>>> -------------------------------------------------- >>>>> Rohit Saraf >>>>> Second Year Undergraduate, >>>>> Dept. of Computer Science and Engineering >>>>> IIT Bombay >>>>> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Algorithm Geeks" group. >>>>> To post to this group, send email to algoge...@googlegroups.com. >>>>> To unsubscribe from this group, send email to >>>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/algogeeks?hl=en. >>>>> >>>>> >>>> >>>> >>>> -- >>>> There are two kinds of people. Those who care for others and The others >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algoge...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/algogeeks?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algoge...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> Siddharth Srivastava >> >> Human Knowledge is for all >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > There are two kinds of people. Those who care for others and The others > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
<<329.png>>