Skip to content

Files

Latest commit

author
Mauricio Klein
Nov 9, 2018
520c06e · Nov 9, 2018

History

History
19 lines (13 loc) · 516 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 516 Bytes

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]