6 kyu

Complete Fibonacci Series

2,124 of 3,238akp

Description:

The function 'fibonacci' should return an array of fibonacci numbers. The function takes a number as an argument to decide how many no. of elements to produce. If the argument is less than or equal to 0 then return empty array

Example:

fibonacci(4) // should return  [0,1,1,2]
fibonacci(-1) // should return []
fibonacci(4); # should return  [0,1,1,2]
fibonacci(-1); # should return []
fibonacci(4) # should return  [0,1,1,2]
fibonacci(-1) # should return []
Algorithms

Stats:

CreatedSep 18, 2013
PublishedSep 18, 2013
Warriors Trained4959
Total Skips352
Total Code Submissions11018
Total Times Completed3238
JavaScript Completions2124
Ruby Completions97
Python Completions1056
Total Stars58
% of votes with a positive feedback rating93% of 461
Total "Very Satisfied" Votes402
Total "Somewhat Satisfied" Votes53
Total "Not Satisfied" Votes6
Total Rank Assessments15
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • akp Avatar
  • jhoffner Avatar
  • JohanWiltink Avatar
  • Tefferson Avatar
  • Blind4Basics Avatar
  • user9644768 Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
Ad