Sum Of Fibonacci Numbers

How many minimum numbers from fibonacci series are required such that sum of numbers should be equal to a given Number N?
Note : repetition of number is allowed.

Example:

N = 4
Fibonacci numbers : 1 1 2 3 5 .... so on
here 2 + 2 = 4 
so minimum numbers will be 2 
Interview Code Editor
Hints
  • Hint 1
  • Solution Approach
  • Complete Solution
1692 successful submissions.
Click here to jump start your coding interview preparation