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 mean it's only a 6 kyu task and it has a regex tag, so it was kind of implied, that it should probably be solved with a simple regex.
$ sign wasn't even necessary.
Treating the whole array as a string is even better instead of iterating over it :)
Would have saved myself alot of time with this approach vs. writing a million if statements.
Yes, there's a difference. Your solution in fact more performant than the OP's solution. His solution has O(n^2) time complexity and yours is O(n) meaning it's much faster.
I tried to go this route, but I did not have in mind to merge the two like that.
Such a brilliant solution!
regex is amazing.
Same here, I couldn't figure out how to implement regex like this one then I gave up xD.
Nice!
I tried to go down this route, but couldn't figure out where to put the $ sign
RegExp don't work like that brother. It will just check only one single character inside the bracket as if you write like you've shown. Check https://regexlearn.com/cheatsheet .
damn this regex again.
this regExp is a must to learn bro
very cool :)
Oh my goodness, regex can do pretty much everything.
because regex will check for match of single character from inside brackets. Check https://regex101.com/ for explanation of this one.
Loading more items...