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.
This comment is hidden because it contains spoiler information about the solution
To conclude: the best possible solution for this problem is a O(n) complexity (check my solution),
which is scaled out to O(2n) with this most "Clever"/"Best Practice".
The point is how s/he leverages pass by reference in his/her solution.
Thanks for your informative comment.
This comment is hidden because it contains spoiler information about the solution
@voyxxx Did you mean 'fewer'?
Very clear! A good example of FP!
@voyxxx, What do you mean? This algorithm traverses the array less then 2 times. Is that to much?
Nice, learned alot from this after reconstructing it by myself. Very Clever.
But it's so easy to read.
nice thank you for the tip @voyxxx!
the more times you go through the array, the better the practice
no one know
Why this is best practice?
There was no requirement to check input, so this solution is optimal.
Loading more items...