Back to Problem Solutions forum
Hey everyone! So, I've not had any issues with these problems thus far, i've solved 21, however I've gotten to problem 67 on fibonacci sequences and have hit a wall. My initial thought would be to create a list of all fibonacci numbers up to the 1000 index limit given and then compare the problem numbers to it and pull those indexes, however with the numbers being as large as they are, I am hitting a wall pretty quickly. Can anyone give me some advice to point me in he right direction? I'm using C# as my language of choice. Thanks!
Hi, thanks for your message!
Your solution should work anyway if you can use some suitable data type for such long numbers.
I believe C#
has special class called BigInteger
for storing values of arbitrary length. It would not be
the most efficient, but with given limits this should work like a charm, if I am not mistaken!
Though later you can find out this problem could be solved even without storing large numbers... ;-)