1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
https://leetcode.com/problems/find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k
Description
Given an integer k
, return the minimum number of Fibonacci numbers whose sum is equal to k
. The same Fibonacci number can be used multiple times.
The Fibonacci numbers are defined as:
F1 = 1
F2 = 1
Fn = Fn-1 + Fn-2
forn > 2.
It is guaranteed that for the given constraints we can always find such Fibonacci numbers that sum up to k
. Example 1:
Example 2:
Example 3:
Constraints:
1 <= k <= 109
ac
Previous1413. Minimum Value to Get Positive Step by Step SumNext1415. The k-th Lexicographical String of All Happy Strings of Length n
Last updated