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.
finding answer is going to be really hard and defination is unrelated with question. However as long as you try to solve you will get more skills and make a repeat what you learned :))
The Ruby version doesn't mention anything about not modifying the original string, but requires that the original string not be modified in order to pass. Even if not modifying input is considered a best practice, it should be specified if it's a requirement.
Neat kata, thanks
I smell a series!
Nice little kata, but it does seem more like a 8 kyu...
Not a bad KATA
"and based on the ASCII values of the chars" => this is simply not true, ignore it. Just sort the array/list and get the first element.
OCaml translation
Python reference solution is wrong: considers
_
to be a letter.Is it possible to solve problems using only standard language libraries?
Thank you for the validation!
I managed to wrangle my way around it by discovering the %g character class in lua but for a good hour there I was pulling out my hair...
You are right and the random inputs you see are a result of a sloppy authoring, which was unfortunately very common long time ago. The description should define what a "word" is, or tests should use some intuitive, non-surprising interpretation. One hint can be the rank of the kata, where a 7 kyu task would usually not require you to handle any complex cases, but it's a bit of handwaving the problem away.
Call me pedantic but a random list of characters is not what i would call A WORD.
But what really gripes me is that your rules for deciding what a "word" is are never defined.
For example, in one of your tests "Let's" is defined as a whole word and even though the 's' sits after an apostrophe, the test does not qualify this as a single letter word. That seems fair to me.
But in your random tests I was given apprently this phrase.
"eQnsghc' xN378hr43hHv1kz O5xF2TuTF 9xN8uJWxQeeH hy'c'jaX6fU ixFBC' 8MT2g '6cdNKKKJwK2Ws9 LVu k4UkP 6sgnrftSHF ba6Xu83mHF6m PWD GcXMUC8Kr1n8GZ qfGknKV4Zcq 1MwvcXRz1e7 V87dPg FKdz7y BW61E7N9 "
Now my code provided 3 but the expected result was 1...
So I'm left with only 2 assumptions...
Either the phrase "hy'c'jaX6fU ixFBC'" wants me to see the 'c' as a single letter word
OR
the phrase "8MT2g" is actually two words "MT" and "g"...
Both conclusions actually contradicts another test:
"1Ay4Ke5MsW'Ib"
which wants a result of 13!Meaning that both numbers and apostrophes count towards a word size!
This is doing my head in.. Can someone smarter than me please tell me why I'm losing the plot here?
Perl translation
Loading more items...