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.
This comment is hidden because it contains spoiler information about the solution
You could say the same about any language
Coding in C# is like coding a suit, everything looks neat and tidy if you follow the conventions and standards. Otherwise your code will look like a fat cat.
A detailed comment isn't necessary, just some mild familiarity with Linq and the string constructor.
C# is not a good code golf language
Really clever, but a bit hard to read. A few line breaks and spaces and it would be better. For performance of course not the best solution but from effort.
I like how peoples solving problems in one line thinking its a good practice, this is a nightmare for maintenance if you asked me, and this line is totally NOT CLEAR, a very detailed comments is required to understand whats going on in there for someone who doesn't know the context .
This code is not clean, nightmare for maintenance work
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.
This is a only math solution!!!
This is very bad bad practice, program spend too much time to bring solution and i don't aprove it.
Better use StringBuilder and for loops - it takes more lines in program but performance is a lot better.
I think in this case best idea is to create this in two ways;
If (string is small) then use linq (or just add strings in loop)
else use StringBuilder
ok thanks. That makes it clear.
But i still dont get why i contains the number of repeats.
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.
This comment is hidden because it contains spoiler information about the solution
Loading more items...