Ad
  • Custom User Avatar

    It really doesn't matter what level you're at — working with prime numbers is always both fun and challenging.
    Thanks for the sexy challenge! 🙌🔢💖

  • Custom User Avatar

    Shit! I see my mistake, repeated once means each letter appears twice. The kata is okay

  • Custom User Avatar

    The instruction is misleading - It states: Given a string, you have to return a string in which each character (case-sensitive) is repeated once.
    "return a string in which each character (case-sensitive) is repeated once" should be changed to "return a string in which each character (case-sensitive) is repeated twice". That would help.

  • Custom User Avatar

    Not a kata issue. Your code is wrong, you are removing duplicates in the string whilst the question asks to double each character in the string.

    Also, you are misunderstanding the logs

    'String' should equal 'SSttrriinngg'

    Meaning that

    actual (what your code returned) should equal Expected correct result from the tests

  • Custom User Avatar

    The tests are broken, in Python - The expected result and actual result are reversed

  • Custom User Avatar

    Forked and approved

  • Custom User Avatar

    LGTM, approved

  • Custom User Avatar

    Take a look at the comments in solution setup: you are not meant to allocate any memory, but you are expected to use the doubled buffer and write your answer into it, and then return the doubled.

    Your solution is almost correct, you just should write to doubled without malloc-ing it.

  • Custom User Avatar

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

  • Custom User Avatar

    A great little exercise.

  • Custom User Avatar

    my bad. thanks for your time. I am n3wb.

  • Custom User Avatar

    You are using the wrong function name. Should be double_char whilst yours is repeat_each_letter

  • Custom User Avatar

    I am getting this error

    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 2, in
    from solution import double_char
    ImportError: cannot import name 'double_char' from 'solution' (/workspace/default/solution.py)

  • Custom User Avatar
  • Custom User Avatar

    Thank you so much hobovsky and Chrono79, I was trying to print the output causing the test to fail, it passed now after making the required changes

  • Loading more items...