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 made the JS-version of this kata, so the chicken and egg was made simultaneously :)
This is a carbon copy of the actual test assertion. What came first who knows?...Chicken and egg...
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
clean, but the intital split/filter repetition seems a bit high in performance cost and very reduceable.
insane
20 lines? 🙂
This comment is hidden because it contains spoiler information about the solution
very nooice
Pretty clean, love it
Or you could just use a.localeCompare(b) instead of trying to find the index.Misread that.I'd say the best say is
[...'abcdefghijklmnopqrstuvwxyz']
How this test works? can you explain this?
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
Loading more items...