Skip to content

Latest commit

 

History

History

challenge-2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Largest subset whose all elements are Fibonacci numbers

The original challenge description can be found here

Description

Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers.

Examples

Input  : [1, 4, 3, 9, 10, 13, 7]
Output : [1, 3, 13]
Input  : [0, 2, 8, 5, 2, 1, 4, 13, 23]
Output : [0, 2, 8, 5, 2, 1, 13, 23]