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.
ah... beautiful!
cool ES6!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I think ListNode... { this.v = value;} will allow external code to mutate the value, therefore violates the constraint of the problem. I might be wrong or there might be a better way... I ended up making a private variable so that no code can set the value after instantiation.
function ListNode(value, next) { this.getValue = function() {return value }; this.n = next; }
beautiful!
This comment is hidden because it contains spoiler information about the solution
The path I thought but never dared to travel by...
oh yeah, you are right :-)
Using reduce will iterate over every character til the end, even if it can have an early escape when a marker is found?
Highly enriching! Thanks for sharing this.
This comment is hidden because it contains spoiler information about the solution