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.
When I see this soulution, I think it is concise and fast.
But when I check execute time, it consumes more time than I think, can anyone told me which parts make this one too slow?
p.s. I compare it with my solution, my solution fast 35 times than it, but I don't know why.
Mine is exactly same as yours, (each line and each word) :P :P
Thank you so much. Without your pointing I would never complete this kata.
done
Thanks :)
This comment is hidden because it contains spoiler information about the solution
I agree that these are strange requirements.
But strange requirements occur in the wild and there are katas with even stranger requirements.
So: Not an issue.
Being easier is not an issue. 8 kyu is meant for the basics.
Missing test cases.
This example is not correct; however, a regex is still a perfectly viable way to validate emails. This one is just bad. If you wish to use your own regex just review the requirements of local and domain parts for a valid email address as laid out in the specs. https://en.wikipedia.org/wiki/Email_address
It doesn't really make sense that it would take a range in any order and ignore the first value in that range...
The name isn't even capitalized, the description is grossly lacking. This is an excercise in gross simplicity that doesn't teach anything.
The description is somewhat misworded, and it feels like 8 is too easy to even describe what is happening here.
some()
returns a boolean,forEach()
does not return a value. Areturn
can be added as a seccond line.This is poorly written. If you are stuck, the problem is he fails to mention the interator function is expecting the index as the second argument.
Loading more items...