[algogeeks] Re: 100th Fibonacci number using LL

2011-07-31 Thread amit karmakar
Since long long cannot store the 100th Fibonacci number, you need to implement or use an existing library for bignum. You may use linked lists to solve this problem. Read about bignum here http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic Here is my implementation for solving this

[algogeeks] Re: 100th Fibonacci number using LL

2011-07-31 Thread bharath
@Amit: Thanks for the solution but I have seen this approach. I was wondering how this can be solved using linked lists without using bignum libraries. Bharath On Jul 31, 12:38 pm, amit karmakar amit.codenam...@gmail.com wrote: Since long long cannot store the 100th Fibonacci number, you need

Re: [algogeeks] Re: 100th Fibonacci number using LL

2011-07-31 Thread saurabh singh
By creating a bugnum library using link list:) On Sun, Jul 31, 2011 at 11:12 PM, bharath bharath.sri...@gmail.com wrote: @Amit: Thanks for the solution but I have seen this approach. I was wondering how this can be solved using linked lists without using bignum libraries. Bharath On

[algogeeks] Re: 100th Fibonacci number using LL

2011-07-31 Thread bharath
@Saurabh: :) Well, I could think of a way of solving this without using other libraries. Use iterative version of fibonacci numbers but when adding the ith and (i+1)st values, use circular linked lists (or doubly linked lists) to add these 2 values. Since the question of integer overflow does