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.
Я этого чара родственник!
Please take time to check documentation of a function before using it :
IsLetter()
match more chars than a-z and A-ZIt is very concise, but at least I have to think harder to verify correctness. I'd like to optimize for readability with minimal congnitive load. I can imagine people that could parse this this without any cognitive load... probably the author. :)
Crafty! (Though if I saw this in a C# code review we would need to have a little talk.* :D ...though I know that in some languages, massive chains of ternaries are the norm.)
*Edit: Actually, it might be fairly readable if formatted with some line breaks.
Horribly slow, would be a major chore to maintain. Why Linq? KISS
My code is pretty simple; straightforward decimal math. Faster than most of the solutions here in the "Best Practices" section. Especially the ones using Linq. One solution using bitwise operators (https://www.codewars.com/kata/reviews/56a1b61ab8433c6f3c000079/groups/56db0ec73cb6f579c50011bd) was faster than mine by about 30%.
Your solution was 20 TIMES FASTER than mine. Just. Wow. Time to go down a rabbit hole...
I learned something new: the params keyword exists, and we can use it to pass an arbitrary number of parameters of the same type, and the function will treat them as an array.
Wunderbar
That's amazing. Such a beautiful solve.
exelent !
the operation "cap - (on + wait)" was made twice in the solution. is this way more performant comparing when the operation made once and assigned to a variable for the later check?
to create the dictionary only once, you could write like in the kumite
How it can be marked as a "best practice"?? O(N * N * log N)
How it can be voted as "best practice" if this approach is O(n * lg n)? it can be solved with O(n)
How it can be marked as "best practice" if this solution at least makes sort twice??
Loading more items...