Beta

The Good Old Pig Latin : Reversed!

Description
Loading description...
Puzzles
Games
Fundamentals
Strings
  • Please sign in or sign up to leave a comment.
  • myjinxin2015 Avatar

    Your random testcase sometimes generates some invlid strings that not ending with ay. Is this your wanted case? ;-)

    String was:  Xdmybwju
    Expected: ['Bwxdmy', 'Wxdmyb'], instead got: ['Wxdmyb', 'Xdmyb']
    

    Don't simplely delete last two chars from the end of string :P

    I think this should be an issue, because you haven't say anything about this in the description.

    Another issue is, you also not tell us that the result should sorted.

  • JohanWiltink Avatar

    Test.assertDeepEquals(reversedPig("Eerschay"), ["Cheers", "Heersc"]);

    Could be "rschEe", "schEer", "chEers" or "hEersc". We have no way to know.

    And the whole thing with the Array result really should be mentioned in the description.

    • Parix Avatar

      Thanks for the feedback. I added more lines to the description. In the case of "Eerschay", as it ends with "ay", first it should be checked if it has vowel before "h" or not. If not possibilities are 2. Either 2 consonants moved to the end or 1. The result array should contain both those possibilities.

      Issue marked resolved by Parix 8 years ago
    • JohanWiltink Avatar

      Would "Scheer" become "Heerscay" ? Or, actual existing word, would "String" become "Ringstay" ?

      I fail to see why starting consonants, to be moved to the back, would be arbitrarily limited to 2.

      Not my Pig Latin.

    • Parix Avatar

      This comment has been hidden.

    • JohanWiltink Avatar

      If you tag them as spoilers, I can't see them ..

    • Parix Avatar

      I thought you already finished it.

  • JohanWiltink Avatar

    How are we to know if "Ohoyway" should translate back to "Wohoy" or to "Ohoy" ?

    (Please note I have only read the description and not looked at anything else. If this is answered somewhere else, your description is incomplete.)