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.
Linq Select has an override that gives you the index of the current item in the selector (that index is the same number of times you need to repeat). I used Repeat didn't realize there was a string constructor overload that does the same.
Also totally forgot about string.Join. Much cleaner code than I wrote on my first pass.
decided to diversify the same solutions :D
ok thanks. That makes it clear.
But i still dont get why i contains the number of repeats.
wtf
This comment is hidden because it contains spoiler information about the solution
can someome explain this Solution to me? How does this even work...
how does it know how often the char needs to be repeated ? I see no iteration.
yes, Thanks for help.
worked now, was totally my fault.
hey, thanks thats true.
I misunderstood the Task.
Since all Sample Tasks gave me the right results on VSCode i thought it has to be correct :P
This comment is hidden because it contains spoiler information about the solution
I am sure that most people solve easy Tasks like this with Linq because it is a good practice.
Your function should return the result, not printing it. There are also conditions in the description you're ignoring.
You only have to check if the array is not empty, as easy as that. Fix your code and it'll work.
This comment is hidden because it contains spoiler information about the solution
to hard to understand for best practice, or am i just not smart enough ? :)
i did it with a Dictionary.
I love this website because you get to see a lot more of the niche pieces of code, which can be overlooked :)
Loading more items...