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.
benchmarking is the only way to find that out.
I think a solution for maximum performance would look quite different and would be significantlyfaster (10x to 20x faster i would totally guess). Usually regular expressions are only faster if your programming language is not so performance (like early perl/php implementations I guess).
This was a million years ago, but I'm wondering about the performance of this solution. It's certainnly very readable and elegant once you know a little about regex. Are there multiple iterations involved? How does that work under the dashboard?
wow
Hmm, regex is always cool, much like an epigraph 🤔.bt clean.
What's funny is that the better solution is the one nobody talks about
This is the best solution. Nice.
never thought of using regEx like this. its actually pretty cool !
Floored by this! A proper use of RegEx, in my view.
Amazing!
Amazing!!
Note that this has time complexity O(N^2) while it's possible to achieve O(N).
Never mind, the piece of optimisation I failed to figure out was checking for a set rather than the entire string. My bad.
I continuously timed out with this exact solution...
I'm new to programming and if I'm wrong please someone correct me!
I believe it's because it's being considered to be null terminated strings.
Therefore the last character of these strings are '\0', but in a empty string this would be the only character
and when we compare it with a string that isn't empty it would return true since '\0' is present in both.
But as far as I understand it isn't something that will be printed in the screen, just something that will be
considered by the machine.
I would never believed that multiple line js would be faster than than one line js regex. Can you tell me if in general using regex is slow?
Loading more items...