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
The same method as mine, just more verbose but also probably more readable.
I kind of get it, but not fully.
This comment is hidden because it contains spoiler information about the solution
This is that solution that makes you kick yourself for not thinking of it. Very elegant.
This comment is hidden because it contains spoiler information about the solution
This is my favorite solution. It is actually pretty dam elegant!
Don't need the ternary since count can never be even. LOL Remnant of trying something earlier.
Thanks, I got it because I did it by hand and got different results than using charCodeAt() and didn't understand because I just kept thinking "what is the difference, every letter is just +96" but when you break it down I understand the math better
Strange that I got it working and the answer has solid hint is in here (only read this after I got it) I don't understand yet the mathmatical difference.
That is my problem also. If letters in alphabet map to sequential numbers where a=1 ... z=24 climbing has more points when all the letters or point values are added together. I must be missing something because people are passing this.
This comment is hidden because it contains spoiler information about the solution
Finally, I see someone else looked for length 3. I assume because if array only has 2 numbers, they will be min and max so result will be 0? Am I right?
This is almost what I tried to do but I didn't know how to properly do the sort() part. I am still trying to understand this (a - b). Good to see a working example.
After completing kata, and looking at other solutions I feel like I cheated without meaning to. I defined objects mentioned, since it is first time I came across a kata that said it had pre-defined objects. There was no info on structure of objects, so I figured the write up was old and there is no more pre-defined objects which is why I made. My solution doesn't work with out my objects so there must be some difference in how I defined them. I have no idea how to know what is wrong since I don't know how the objects are structured or what's trying to misuse them.
An improvement would be to display objects in the instructions;
Further, I am a little slow. I realize now I can just loop through the objects and print, to see if they existed and their contents. It is only 7th Kyu and that is my excuse.
Loading more items...