Fibonacci words are defined as $F_0 = a, F_1 = b, F_{n+2} = F_nF_{n+1}$ where $a, b$ are letters. How can you find the longest Fibonacci sub-word in a given string? Try to solve it in linear time ($O(n)$).
Example: in a string: BCBAABACB
the longest Fibonacci sub-word is BAABA