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.
you can not compile regexp in function, you shoud remove it outside and do a constant. compiling regexp is expensive
so good format function not use regular expression
youve got to be kidding me
is regexp faster than rune iteration?
Wow! xD
The most efficience way + it short coding
Is this better or were you just having fun? I never would have thought to use Regex on this. Cool solution!
Thanks for comment! You're right, that solution destroys the order of array1 and it doesn't guard against duplicates in array1 as it should according to requirements.
Does this destroy the original order of the passed vector (array1)?
Otherwise it's nice to note that copying woulf preserve.
I didn't guess to use copy_if and any_of. Thanks.
What if array1 has duplicates?
Same here, but sometimes re-submitting the same solution worked for me. No idea why.