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.
User function should be called inside
it
blocks. Now all user calls are lumped in front of test cases, which means user logs are also lumped together instead of going into their respectiveit
blocks.Also, your random test cases sometimes include words with question marks or dashes.
So I gave up and looked at the test cases. :[
Words in the dictionary are defined by
pageArray = SetOfBooks[l][j].split(" ").toLowerCase().replace(/[.,\\/'"\]\[]/g, "")
.So "And fifty ... miles ... up." is split into SIX words, two of which are empty but are counted. Can you imagine my frustration now? That is what I would have liked to hear from you.
(Also, you are building your dictionary not once, but once for every word in the plaintext.)
Hi frustrated Johan :)
You should read the instructions more carefuly, because they clearly say:
"Messages you and your contact encode must NOT include commas, punctation, brackets etc (that's what you agree upon)."
So knowing this, do you still have doubts about how the word is delimited?
Desperately needs clarification of
word
.Is a word delimited by spaces only? What about dashes? Apostrophes? What do I do about periods and commas?
After an hour of trying to reverse engineer your text handling, invoking various incantations of
.match(/[-'a-z0-9]/gi)
and.split(/[ ,.\[\]]/)
and being NO CLOSER to reading your mind, I'm giving up. Off by one, off by one, off by several. Repeatedly, forever and ever and always.Specify this shit!
(Yes, frustrated. Yes, there are more ways to split text into words than you or I can imagine.)
When the issue it resolved the points get re-added this I assume is an insentive to solve issues on the kata.
I've added some random test cases. It was my first time to create such, so I hope this is what you meant.
BTW - did you know that reporting issues gives -3 to honor to the one the issue is against? Damn man! You disshonored me! Whare's my catana?
Needs random test cases!
Thank you very much Zozo. Your remarks make a lot of sense. Do you think that my description doesn't make it clear enough that return format should be [b0 p0 w0] ? I've exaplained it thoroughly and gave some examples. Should I anotate it the way you suggest anyway?
Also: won't removing the books make it hard for people test and debug? What do you think?
This comment is hidden because it contains spoiler information about the solution