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 dont think so, given that there has to be a missing letter at index 1 or length -1. In that case it is fine and works. In general it could be better code practice to avoid index errors.
Wrote this the exact same way. Beautiful code!
Off-by-one error. The condition in the loop needs to be
i < letters.length - 1
.Thanks!
nicely done
nice, cleanest solution i've seen.
Doesn't seem so DRY
bro i solved it simiarly) nice job friend
This comment is hidden because it contains spoiler information about the solution
this solution deserves more upvotes for best practices
beautiful code
well explained - thank you!
It looks like this does the entire 'sumPoints' calculation twice each time you do a compare. Wouldn't it make an appreciable difference to calculate all the scores once and then use those values to sort?
you saved me!
You should never put any information which might give away the kata solution in the comments (without checking the "mark as having spoiler content" box) as they're visible to every one.
This comment is hidden because it contains spoiler information about the solution
Loading more items...