The link: https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/
The way I have tried to solve this problem is by using a list of maps. Every element