Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
https://www.codewars.com/kata/5a1ebc2480171f29cf0000e5/discuss/javascript#633a0080198a4c00306ac9d2
Not anymore.
Please state the language next time. I guess it's Javascript.
I think the problem is with
n = 0
, the reference solution expects0
and your solutions returns1
, but this edge case is tested only randomly, and the description should give explanations about it. I thinknth
fibonacci doesn't make sense withn < 1
, so there's something unclear here (the description says the sequence starts with0, 1
, some variations assume it's1, 1
; however the description is incorrect since in sample tests forn = 1
, the expected answer is1
). Some clarifications are needed (this should be raised as an issue IMO).Please use spoiler flag next time.