We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
1) There is no way you are going to be able to build an actual string of most fibonacci words involved here.
2) The trick is to track where a and b are in each word in the sequence, and the total length of each word, without copying anything.
3) You can't avoid dealing with numbers that are higher than most built-in long int data types. I used javascript and wrote some simple functions to do arithmetic with integers in strings (i.e., '134534234345' instead of 134534234345).
Project Euler #230: Fibonacci Words
You are viewing a single comment's thread. Return to all comments →
Here are some hints
1) There is no way you are going to be able to build an actual string of most fibonacci words involved here.
2) The trick is to track where a and b are in each word in the sequence, and the total length of each word, without copying anything.
3) You can't avoid dealing with numbers that are higher than most built-in long int data types. I used javascript and wrote some simple functions to do arithmetic with integers in strings (i.e., '134534234345' instead of 134534234345).