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.
fixed some time ago
not anymore
I'm surprised that this is quite highly voted as clever, as I wrote pretty much the exact same code and it was my first ever C# code.
it's C, and I have the exact same problem...
Reasonable. Added.
Mmm... Yeah, you're right. Fixed the headings, description and the conflict.
I wonder why only version 2.4 of TypeScript is enabled?
I was suprised to discover that I can't use
Object.entries()
and had to write my own object-iteration code.I think the typescript template should at least define the parameter type. Currently it's:
My suggestion:
I suggest an additional test for a scenario where the template contains no
#
characters:IMHO this line in description:
conflicts with the lines that follow:
It states that I don't have to validate numbers, and then goes on talking how to deal with numbers that don't fit the pattern, which essentially is a validation logic.
It's also confusing to me what does "digits in a number that can't be formated" mean and how one is supposed to skip them.
I suggest rewriting the description as follows:
Also, the title "Introduction" doesn't make sense when it's followed by the whole description of the problem.
Problems with typography and Markdown formatting:
# heading
not###heading###
The description should say what to do about corner cases:
"_A__B"
I think the description should simply say:
This comment is hidden because it contains spoiler information about the solution
Well, I haven't really come across many katas in puzzle category. So I made a search and looked into several examples, but I have to admit I saw no clear pattern. There were some code-golf problems, but also a whole lot of other things ranging from counting even numbers to implementing MineSweeper. Importantly I noticed no other problems where only one solution would be applicable.
I also have no idea how to research for a solution to this problem. I guess one could google for "shortest code for reversing array in JavaScript", but that's just googling for the exact answer.
But most importantly, as many others have commented, a correct solution to this kata is actually not even possible - according to description the solution should reverse an array containing any types, but the .sort() solution will fail when the array contains undefined values.
Maybe. But then, this is how every Puzzle kata works, too. Then again, if the solution can be researched (e.g. language tricks that lead to a better understanding of the internals) then there is merit after all.
Loading more items...