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.
Approved. Thanks!
@FArekkusu your method may still have at least one match from the dictionary. If I replace a random digit with another digit, I may still get a match from another word in the dictionary.
Example: I have
['ape','ate']
in the dictionary, and I choose '273' (from ape). I replace the center '7' with '8' according to your algorithm. Now,'ape'
wouldn't match with'283'
, but'ate'
(code'283'
) would match. So a single replacement may generate a match from another word in the dictionary, where the original point was to avoid any matches by replacing a single digit.Added random test cases, where the given
seq
will not have a match in the dictionary.Yes, I get it now. You mean to add random test cases where no match for the given
seq
will be found in the given dictionary. I will add another set of cases where the givenseq
will not be found in the dictionary, and where the return value must be a string made up of first letters of letter groups for the given input. Give me a couple of minutes.Can't get your comment. Can you rephrase it?
Resolved. Added random tests.
I don't think random tests are feasible for this kata, because it involves generating random words which may not be found in an actual dictionary (T9 is based on real-life dictionaries). Anyhow, fixed the case-sensitivity and empty input issues in the description. Thanks for your valuable feedback! Should I mark resolved?
Resolved.
Yeah, I would definitely give the mappings. Will edit in a few moments. I think the same solution applies for python 3.6. I will also translate the solution in a few moments. There are kata which deal with regular numeric keypad typing, like this and this. No kata deal with actual T9 typing.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution