package leetcode;

/**
 * https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/
 */
public class Problem873 {
    public int lenLongestFibSubseq(int[] A) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem873 prob = new Problem873();
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/
 */
public class Problem873 {
    public int lenLongestFibSubseq(int[] A) {
        return 0;
    }

    public static void main(String[] args) {
        Problem873 prob = new Problem873();
        System.out.println(prob.lenLongestFibSubseq(new int[]{1, 2, 3, 4, 5, 6, 7, 8})); // 5
        System.out.println(prob.lenLongestFibSubseq(new int[]{1, 3, 7, 11, 12, 14, 18})); // 3
    }
}

Update problem 873