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.
Duplicate (?):
The return value is two different but equivalent encodings of the input value. That means you are asking for two things at once, either of which can independently be right or wrong.
Do one thing, and do it well.
( Six issues probably mean you're not doing the two things well now. )
Duplicate: https://www.codewars.com/kata/555b605a76962690ea0000c8
New test framework should be used in the sample tests.
No random tests.
Having multiple output types is a bad practice.
And the only integer which requires a different output type contradicts the "only positive integers" restriction...
Your fibonacci coding function is wrong which means that the examples in the description, sample tests, fixed tests, and random tests are wrong too.
How come your fibonacci coding explanation in the description is correct but the very same test case isn't?I've looked up the actual algorithm on Wikipedia, and even your explanation is wrong. The correct fibonacci encoding for
17
is"1010011"
.Don't mention stuff that is not being tested.