Length of Longest Fibonacci Subsequence
A sequence X is Fibonacci-like if:
X.length >= 3 For all i + 2 <= X.length, X[i] + X[i+1] = X[i+2]. Given a strictly increasing array arr of positive integers forming a sequence, find the length of the longest Fibonacci-like subsequence of arr. If one does not exist, return 0.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)