Given an array of 0s and 1s and a recurrence relation defined as f(1)=1, f(2)=2, f(n)=f(n-1)^2 - f(n-2)^2, output 0s and 1s alternatively according to the calculated sequence values.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.