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.
@jonfen Yeah, but then Elon had to go and name his kid X Æ A-12, so we can't really assume classic alphabetical names anymore :P
Yep, but see above; '1234' is still a string with a length of 4, so it meets the criteria.
The kata never stated that the friends' names should be actual real-world names, so based on the criteria you shouldn't discriminate against strangely named people (lookin' at you, Elon :P).
In a lot of lower-level kata, type safety isn't the point of the puzzle or tested against in the solution, so there's a lot of code golf.
Details never indicated that numbers or other Unicode chars couldn't be part of a valid name.
This comment is hidden because it contains spoiler information about the solution
That is strange; I am taking the array you gave and running it through the same function that Codewars should be running it through behind the scenes, and it's turning up correctly. I will look at my test cases and ensure everything looks correct.
The random cases are run through a loop however, so it's imaginable that if there's an issue with one there'd be an issue with them all. Are you passing some random test cases before this happens or does it happen on the first one?
EDIT: I just tried it again and it works. I know Codewars has been buggy for me all day (assigning servers and such), and since the random arrays are generated by a function that should be preloaded in the execution order, maybe it's not being executed serverside by Codewars?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thank you :)
There are some issues with this kata.
First, the description for the test says the function will always only be tested for values under 10,000, but the random input generator was giving values of up to 50,000.
Second, the kata should state what format the decimals should be in. The kata was looking for an answer '105.5' for a 50 cent value---to me it would make more sense to state a cash value as '105.50', but if OP wants the answer in the former layout the description should state so.
I like this kata, but have a few suggestions. It might be better to frame the problem better and to specify that we should expect the birthdays to be distributed uniformly. It might also be better to specify that we are looking for a number between 0 and 1 and not something like 0-100.
boo
Kata should probably specify that only single digits should pass?
why
lool the salt is real
oh my god. what
Loading more items...