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.
17 is the correct solution; the problem states that kings are either worth 10 or the anounced number (9 in that test case), whichever yields the better solution. In this case, the king value of 10 gives 17 (1+1+1+10+4).
thanks!
Forgot to add in local tests for the JavaScript, just put them in, thanks.
The last line of the description is "Assume n is an even number between 2 and 2000."
Got it, thanks!
Fixed the typos, thanks!
Thanks for the feedback. I'm new to testing - am I correct that "random testing" means testing the function with random numbers to make sure the output doesn't return an error (and, perhaps, that it falls within the expected output range?)