Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @GamingGnawer,validated by @Remi,@Boris-Bodin and @Daniel_Kirchner.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @GamingGnawer,validated by @Remi,@Boris-Bodin and @Daniel_Kirchner.
If you have any issues, feel free to ping them.
I don’t get it. How do I determine which one the kangaroo word is?
You have to check the words against one another.
Say, if you are checking whether word_k is a kangaroo word for word_j, you may loop through each character of word_j to see if the characters appear in ascending positions in word_k.
Hi all, my code (in Python) passed all tests but failed Validator 2. Do you have any hint, what is the problem?
It’s difficult to tell. But try whether your code passes the following custom case:
Input
1
jeez, beep, pfft, ez
Output
jeez: ez
Thank you @5DN1L ! I stumbled upon two issues with the statement which led to confusion, at least for me. Thus, my low level question in my first post.
First: The statement could be more concise what should happen if one thesaurus includes multiple valid kangaroo words. All of them are expected to be part of the output.
For example: thesaurus: ["aaah", "aah", "ah"]
yields aaah: aah, ah
and aah: ah
.
Second: NONE
is expected if and only if there are no valid kangaroos at all. If one single thesaurus does not contain a kangaroo word, but others do, the line is expected to be ignored.
Indeed there may be confusion. I’ll pass on your comment to the author for their consideration. Thank you.
Can you share validator 6 or 8? I’m passing all tests but failing the NONE validators.
I am using a regular expression on the excluded chars of each word, its working well on tests but the validators got me blocked for hours now.
It’s not a good idea to share the validators here in public. But if you want, you may send me your code in private message and I’ll try to come up with some custom cases to help you debug.
I know how frustrating it is when your code passes the test cases but not the validators…
Not sure if this helps identify your issue, but you can try this custom code:
1
deed, move, step
result should be:
NONE
Thanks, my error was not getting the synonyms by line, I was joining all words in a single bucket instead of processing each line of words separately.
Below is a custom case which may help players who fail Validator 6:
Input
2
as, since
aseptic, disinfectant
Output
NONE
I produced
aaaah: aaah, aah, ah
aaah: aah, ah
aah: ah
ooh: oh
oooh: ooh, oh
ooooh: oooh, ooh, oh
on test 5, but the answer is
aaaah: aaah, aah, ah
aaah: aah, ah
aah: ah
ooh: oh
oooh: oh, ooh
ooooh: oh, ooh, oooh
For the ahs it has the longer words come first but for the ohs it has the shorter words come first.
What’s with the switcharoo? Is it needed? Or is this being a mean kangaroo?
I realized my mistake. The keys need to be in alphabetical order and so do the values.