Fibonacci Like Subsequence Length

Given a strictly increasing array arr of positive integers, return the length of the longest Fibonacci-like subsequence of arr.

A sequence is Fibonacci-like if it has at least 3 elements and each element after the first two is the sum of the two preceding elements: for consecutive elements in that subsequence, x + y = z.

A subsequence is formed by deleting zero or more elements from arr without changing the order of the remaining elements.

If there is no Fibonacci-like subsequence, return 0.

Examples
Input: [1,4,10]
Output: 0
Hints

Fibonacci Like Subsequence Length

Given a strictly increasing array `arr` of positive integers, return the length of the longest Fibonacci-like subsequence of `arr`.