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.
Needs random tests.
How many words out there have 5000 letters?
This comment is hidden because it contains spoiler information about the solution
you're accepting all characters above ch 48 except 95... Which means you are accepting 69 of ASCIIs 128 characters... There are not 69 alphanumeric characters.
Added
_
and5
as separators to java, js and python tests (c# would need more work)Many incorrect solutions were invalidated (at least in python). Sorry guys...
At least the java version has a very lax acceptance test suite.
I suggest adding tests like
there_once_was_a_boy -> t3e_o2e_was_a_boy and 123456 -> 123456
since a lot of regex solutions fail in these cases, even though description clearly states words contain only letters. Clarification of "letters" would also be great! Should the solution work for non-english letters like æbleskiver -> æ8r or is that outside the scope?
In short description might need to be changed to specify "english alphabet letters", and tests that check that only letters are used are missing
the \w includes numbers letters and underscores so no it will think numbers are letters too and even abreviate numbers! 999999 abbreviates to 949! it will also mistakenly take words separated with underscore as being one word.
Regex wordcharacter class includes more than just letters. This solution will make mistakes with words that include underscores or numbers
This solution does not follow the descriptions definition of word. for instance gamma_codex should be abbreviated g3a_c3x.
at the time it had not even gotten any upvotes for clever. I agree some of the 'worse' (performance wise) solutions may be more production friendly, but this is definitely clever. Its good to see more upvotes are comming in for this one
It's definitiely clever, but it's not clear.
Fair I guess I read it too fast xD
From description: "A string consists of lowercase latin letters, digits and symbols."
This comment is hidden because it contains spoiler information about the solution
Great golf code, horrible production code
Loading more items...