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.
Well, returning 2.0 isn't really an error. The description didn't define the behavior for invalid inputs. From the description, "There is an array with some numbers. All numbers are equal except for one." Your list doesn't match the expectations for this kata, so I'm not sure what you expected to be returned.
This comment is hidden because it contains spoiler information about the solution
Thank you!
You are absolutely correct! Ugh! I have created a couple forks that I believe resolve that bug.
Sorry, it's been so long that I can't remember which language I attempted. I should have noted at the time. Probably JavaScript?
You are absolutely correct! And I admit that didn't even occurred to me until after I submitted my solution. However, for an 8 kyu, I never bothered coming back to write a more careful version, like one that also only iterates over half the characters. But I suppose I could...
Ruby
Thank you!
This comment is hidden because it contains spoiler information about the solution
I've also attempted a Ruby Translation. Please, let me know if it looks alright.
Looks great!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I agree with everyone else, it just needs more tests. And maybe a few random ones.
Loading more items...