Ad
  • Custom User Avatar

    Approved. Thanks!

  • Custom User Avatar

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

  • Custom User Avatar

    Added random test cases, where the given seq will not have a match in the dictionary.

  • Custom User Avatar

    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 given seq 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.

  • Custom User Avatar

    Can't get your comment. Can you rephrase it?

  • Custom User Avatar

    Resolved. Added random tests.

  • Custom User Avatar

    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?

  • Custom User Avatar

    Resolved.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution