Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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! 🙌🔢💖
Shit! I see my mistake, repeated once means each letter appears twice. The kata is okay
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.
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
Meaning that
The tests are broken, in Python - The expected result and actual result are reversed
Forked and approved
LGTM, approved
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 thedoubled
.Your solution is almost correct, you just should write to
doubled
withoutmalloc
-ing it.This comment is hidden because it contains spoiler information about the solution
A great little exercise.
my bad. thanks for your time. I am n3wb.
You are using the wrong function name. Should be
double_char
whilst yours isrepeat_each_letter
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)
C++ Translation
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...