Given an array of integers, find the longest subsequence that follows the Fibonacci sequence property where the sum of two previous elements equals the next. Return the subsequence, or [-1] if no…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.