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.
When you solve a problem, it gives you the option to rate it. When you rate a coding challenge you also get +1 honor.
Sometimes when I feel a coding challenge is not well-explained and I want to negatively rate it, I unlock the solutions, copy one, "solve" the challenge and then rate it with Satisfaction = "NONE".
It's been a while since I wrote this. But first thing I would do in order to optimize it now, is to replace Linq and put everything into one loop.
Thank you!
Sometimes when people want to learn how a particular solution's code works they will 'Train Again' on the kata using a copy of that code. They might then accidentally submit the code as a solution, instead of just playing around with the code and learning from it. I know I have done this by accident before.
That's the charitable explanation anyway! :)
If it's not their second solution then there's probably something dodgy going on...
I can be wrong, reading a little more, if the const declaration were inside the function it won't work. I think it is a matter of scope. Check this
It's called hoisting
manual notification, see above
This comment is hidden because it contains spoiler information about the solution
I was confused by your comment at first until I saw your solution, great example why regular expression is such an important tool. The ability to rearrange capature groups is a game changer, I'd seen it done before but until your solution I hadn't taken a deeper look, so thank you :)
This comment is hidden because it contains spoiler information about the solution
In German locales the
;
(semicolon) is the System default for list separators in Windows systems, so e.g. Excel will use this as CSV delimiter. Maybe the Sensei (whose user is already deleted on the platform) comes from a country where the System locale also has this default value and so he thought this was the way to go.Edit: The comments state that a user named
SteffenVogel_79
created this Kata, so most likely he is from a German speaking country.It's totally fine - looks like a good solution to me. Why wouldn't it be allowed?
haha thanks!
Well I completely forgot about this code I wrote. Nedless to say, this is not something I'd write in production code! π