Solution Review: Generate the Nth Fibonacci Word
Follow the step-by-step instructions to generate the nth Fibonacci word.
We'll cover the following...
We'll cover the following...
Solution
Explanation
The first two words in the Fibonacci word series are A and B, respectively. Each word in Fibonacci is a sum of its previous two words.
Lines 22-24: For n < 0, we will simply store "Empty String" in strl.
Lines 26-32: A Fibonacci word series starts with A and B. ...