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.
I'm sure this is clever, but wow, it's awfully dense. If you were writing code for production, it would need a lot of comments!
But I think you were not writing for production.
Im gonna take this
What does this do? Please some comment or description.
Good, but the same regExp is evaluated twice on a given string which is inefficient for very long inputs.
That can be optimized.
Impressive. very nice.
This comment is hidden because it contains spoiler information about the solution
Really clever !
for these regex ones I'm not quite sure I understand how they verify that one pair doesn't close before an inner pair is closed?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Nice solution, but Imho I've made a bit better one.
You run regex twice for each iteration.
Checkout mine solution. It uses only onre regex per cycle and compares string length change.
This comment is hidden because it contains spoiler information about the solution
This is where a lot of coders fail. Trying to optimize stuff that doesn't really need to be optimized. Unless if the specs tell you about repeatedly processing enormous strings with limited resources, parsing strings with a stack or regexp is going to be essentially the same.
If both solutions meet specs, then both are efficient. Of course, you should plan a little flexibility into your solution based on implied specs, but there were no implications in the short description. Very straightforward problem with a very straightforward solution.
The nice solution!
I'd suggest to create the regexp once as a const.
Loading more items...