about | help | code help+videos | done | prefs |
Sunflowers have seed spirals that have consecutive Fibonacci numbers of seeds. Let's call a flower a "Number Sunflower" type of flower if it also has consecutive Fibonacci numbers of seeds. Fibonacci numbers are of the form: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... where the first two Fibonacci numbers are 1 and 1 and each number after that is the sum of the previous two numbers. For this method, num1 will always be less than num2. Also, num1 and num2 will be positive integers. Return true if num1 and num2 are consecutive Fibonacci numbers. Otherwise return false. numberSunflowerAustralia(55, 89) → true numberSunflowerAustralia(89, 111) → false numberSunflowerAustralia(9227465, 14930352) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy