Maybe I misunderstand my assignment last time.The actually problem description should be like the following:
I have an array: A B AB BAB ABBAB BABABBAB
The number of each term of the array is base on the Fibonacci number.
Put the n-th string and the n+1-th string together, then producing the n+2-th string:
BABABBAB = BAB + ABBAB
Then is the x-th (eg.10^16-th) letter of the n-th term which count from the last letter is A or B? Eg. the 6th letter was B, not only in the 6th term BABABBAB
but also in the later terms ABBABBABABBAB
The 7th letter is A in the the 6th term BABABBAB
and also in the later terms - ABBABBABABBAB
The most inspiring news is that someone has a Θ(1) solution.
if [x / g] * g >= x - 1 then it's B else it's A. g is the golden mean.
but he or she didn't explain why it works.