6 kyu

Missing Alphabet

466 of 1,164MicheleCarbone
Description
Loading description...
Strings
Algorithms
Games
View
AllIssues6Questions3Suggestions11Show Resolved
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • farhanaditya Avatar

    JS: Node v12 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this

  • farhanaditya Avatar

    JS: Should have more sample tests

  • ainsl.ie Avatar

    Nice kata. Had to make several attempts at cracking this one, but got there in the end with a unelegant solution

  • mjsspencer Avatar

    Nice kata.

  • nick3499 Avatar

    thank you kata sensei for comprehensive instructions.

  • ParanoidUser Avatar

    A minor typo in the description: The function should insert only after the first occur[R]ence ..

  • FArekkusu Avatar

    Mistake in sample tests in Ruby:

    Test.assert_equals(insert_missing_letters("hello"),"hIJKMNPQRSTUVWXYZeFGIJKMNPQRSTUVWXYZlMNPQRSTUVWXYZloPQRSTUVWXYZ")​    <--    unknown character after closing parenthesis
                                                                                                                                   (it's not being displayed here for some reason)
    
  • mmanousos Avatar

    I am unable to validate my solution: getting a tIDENTIFIER error on line 20, but my code is only 15 lines long. So maybe it's an error with the test?

    main.rb:20: syntax error, unexpected tIDENTIFIER, expecting keyword_end

  • gonpeche Avatar

    The last "l" given in the example of "holly" shouldn´t be also followed by the missing letters of the alphabets? Something like:

    output="hIJKMNPQRSTUVWXZoPQRSTUVWXZlMNPQRSTUVWXZl + MNPQRSTUVWXZ + yZ"

    Hope I didn´t miss anything.

  • KenKamau Avatar

    Haskell translation

    Please review and approve.

  • heptapod Avatar

    This comment has been hidden.

  • kartoffelmozart Avatar

    I get a missing substring error here but a normal output with the same code in my own program. Is that a thing?

  • joecastle Avatar
  • joecastle Avatar
  • yellowBunny Avatar

    holly is not good example in descryption. two ll in 'holly' are misleading I thing.

  • HerrWert Avatar

    I really enjoyed this kata and hope you'll create more!

  • KenKamau Avatar

    Ruby translation

    Please review and approve.

  • KenKamau Avatar

    Python translation

    Please review and approve.

  • JohanWiltink Avatar

    10 Random tests is a bit spare. I'd suggest a 100.

    Also needs better fixed testing with edge cases. I'd think an input string containing all letters might be an edge case - that one should definitely be tested. Odd and even numbers of occurrences of the same letter ( for people who are toggling presence of letters ). Any edge case that might come up from random testing ( with any solution ) should be added as a fixed test ( solvers should help you out here ).

  • JohanWiltink Avatar

    The empty string has no occurrences of characters. So returning the full aphabet is illogical; returning the empty string would make much more sense. Current specification is in contradiction with the description itself.

    Also, it's not even specified. Being a special case, it should definitely be in the description. ( Or expect ""; then it conforms to the existing specification. )

  • JohanWiltink Avatar

    if the special character is a space you should replace it

    with what?

    Also, input validation does not really add anything to the kata. Please just skip it.

  • tommyhyatt Avatar

    Hi Michele, enjoyed the Kata but I think you should add to the description the instruction to return the lower-case alphabet for an empty string, or a string consisting of just a space.

    (To be honest, I'm not sure of the logic for returning the lower case alphabet, or why it needs to return anything other than an empty string? Don't know if it adds anything)

    But yeah, maybe stick it in the description or at least the example tests? Thanks though.

  • Voile Avatar

    Random tests expect undefined for empty string.

  • Voile Avatar

    Input validation tests should be put in the fixed tests: you're not guaranteed to generate such a test case in the random tests.

  • Voile Avatar

    Hiding random tests is not considered good practice at all. It serves nothing but making code harder to debug.