about | help | code help+videos | done | prefs |
The Fibonacci numbers are a sequence of integers starting with 0, 1, 1, 2, 3, 5, ... The next number in the sequence can be found by adding the two previous numbers. So the next number in the above sequence is 8 since 3+5=8. Given an integer n, return an array containing the first n Fibonacci numbers. You may assume that n will be a resonably small non-negative integer. fibonacci(1) → [0] fibonacci(3) → [0, 1, 1] fibonacci(5) → [0, 1, 1, 2, 3] ...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: 220
Copyright Nick Parlante 2017 - privacy