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.
Thanks for that, the difference is a bit more than I hoped but less than I feared =)
At least it confirms (if it was not obvious):
which is evidentely the best practice anyway, as a function reason to be is to be called more than once! (But I'm not responsible for most people confusing "best practice" and "shortest solution"…)
Just to needlessly contribute to a 5 year old debate, here are the timings i get:
Where
n
is the list size andcomparing this solution to the solution of Mercy Madmask.
Use proper code formatting (triple backticks) please.
magic
bad algorithm. for loop inside the for loop. index method is O(n)
I got a companion.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
did you animated the dragons and bullets ? just kidding.
Click View Solution in his post to check his solution.
Sivakumar, how do you do that?
Thanks,
Josh
Nice solution. But you can return false first.
I don't know how it is clever and best practices. Friend, filter means one loop. here 4 filter. we can do it easily by one loop.
This comment is hidden because it contains spoiler information about the solution
yeah. got my company.
Loading more items...