[Community Puzzle] Kangaroo words - Puzzle discussion

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?

  1. You have to check the words against one another.

  2. 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.

1 Like

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
1 Like

@5DN1L Thank you very much. It does not pass.

1 Like

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.