Ad
  • Custom User Avatar

    Python test cases seem to contradict themselves on duplcation. The simple test cases say we shouldn't allow duplications, ex:

    [['cheese'], ['rat', 'rat', 'tar'], ['star', 'tars', 'tsar']] should equal [['cheese'], ['rat', 'tar'], ['star', 'tars', 'tsar']]

    while the random tests allow lots of duplication, see the ['Mm', 'mM'] failure below

    [['AQipcR', 'ARciQp', 'ARicQp', 'AipcQR', 'ApcQiR', 'QcApiR', 'QpAcRi', 'QpiRcA', 'RQpAic', 'RcApiQ', 'RpiQAc', 'cARiQp', 'cRpQAi', 'pRAciQ'], ['BpUDwoj', 'BpUowjD', 'BwUDopj', 'DoBwjUp', 'DpwUjoB', 'DwoBpjU', 'UpjwoDB', 'UwjopBD', 'jBUwDop', 'oUwDjBp', 'opBjUwD', 'opjUBDw', 'pUjwoBD', 'pjDBoUw', 'pjowUDB', 'poBUjwD', 'wUBjoDp', 'wUjBDpo'], ['BwUDopj', 'DUpBwoj', 'pUjwoBD'], ['CiboySMp', 'MoCpibSy', 'MpSboiCy', 'bCMyiopS', 'ipboySCM', 'oCiSpybM', 'oiMbSpCy', 'oypbCiSM', 'pCMyiobS', 'yiCpoMbS', 'yoCMSibp', 'ypCSbMio'], ['FPcusOuzT', 'FPsOuzTcu', 'FczuTusPO', 'OuPucFszT', 'OuuczFTsP', 'PFOuzucsT', 'PuTFucOzs', 'cFOTPuzsu', 'cTuzuPOFs', 'csuuzTFPO', 'sFuPzuTOc', 'uPOFTczsu', 'uzuFOPcTs', 'zOcFsTuPu', 'zcsPuFOuT'], ['Mm', 'mM']]

    should equal

    [['AQipcR', 'ARciQp', 'ARicQp', 'AipcQR', 'ApcQiR', 'QcApiR', 'QpAcRi', 'QpiRcA', 'RQpAic', 'RcApiQ', 'RpiQAc', 'cARiQp', 'cRpQAi', 'pRAciQ'], ['BpUDwoj', 'BpUowjD', 'BwUDopj', 'DUpBwoj', 'DoBwjUp', 'DpwUjoB', 'DwoBpjU', 'UpjwoDB', 'UwjopBD', 'jBUwDop', 'oUwDjBp', 'opBjUwD', 'opjUBDw', 'pUjwoBD', 'pjDBoUw', 'pjowUDB', 'poBUjwD', 'wUBjoDp', 'wUjBDpo'], ['CiboySMp', 'MoCpibSy', 'MpSboiCy', 'bCMyiopS', 'ipboySCM', 'oCiSpybM', 'oiMbSpCy', 'oypbCiSM', 'pCMyiobS', 'yiCpoMbS', 'yoCMSibp', 'ypCSbMio'], ['FPcusOuzT', 'FPsOuzTcu', 'FczuTusPO', 'OuPucFszT', 'OuuczFTsP', 'PFOuzucsT', 'PuTFucOzs', 'cFOTPuzsu', 'cTuzuPOFs', 'csuuzTFPO', 'sFuPzuTOc', 'uPOFTczsu', 'uzuFOPcTs', 'zOcFsTuPu', 'zcsPuFOuT'], ['Mm', 'Mm', 'Mm', 'Mm', 'Mm', 'Mm', 'Mm', 'Mm', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM', 'mM']]

  • Default User Avatar

    Cool kata, but there is critical flaw in edge cases tests, where we asserts that
    ["aaA", "Aaa", "aaa"] equals [["aaA", "Aaa"], ["aaa"]].
    It is wrong, the right answer should be [["aaA", "Aaa", "aaa"]], because anagrams are case insensitive by its nature, referring to related Wikipedia article https://en.wikipedia.org/wiki/Anagram :
    "Listen" is valid anagram for "Silent" vice versa, despite that 'l' and 's' letters have different cases in both words.
    Same is relevant for these examples as well:
    "New York Times" = "monkeys write"
    "Church of Scientology" = "rich-chosen goofy cult"
    "McDonald's restaurants" = "Uncle Sam's standard rot"
    and more on. Please fix that test case!

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar