Given an array of positive integers nums, find the length of the longest Fibonacci subarray.
A subarray of nums is called a Fibonacci subarray if:
Its length is at least
Every element from the third element onward is equal to the sum of the preceding two elements.
Return the length of the longest Fibonacci subarray in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]
Given an array of positive integers nums, find the length of the longest Fibonacci subarray.
A subarray of nums is called a Fibonacci subarray if:
Its length is at least
Every element from the third element onward is equal to the sum of the preceding two elements.
Return the length of the longest Fibonacci subarray in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]