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.
Also, it says in the instructions that "Each number will....consist of only the digits 0-9" The unknown number cannot be a negative. -1 should be thought of as Out Of Bounds.
It expects
-1
because there is no such rune that satisfy the equality.I manage to create a specific test case so that you cannot create a huge string that concatenate calls to getChunk().
Now go ahead and try :)
Hello,
I think this is gonna help you because I don't clearly understand your problem (and the jsbin code is evolving):
There is currently no test were the text is only "\n". (Although I might add one because my implementation would failed in that case!).
I guess there is someting wrong in your implementation, likely regarding the word count.
One important thing: you broke one rule in your implementation: "You cannot concatenete calls to getChunk."
It's hard for me to test that, maybe I'll with a huge string which cannot fit in memory.
Please respect that rule, which is the very goal of this exercice: parse by chunks!
I'll try to provide another object to bypass the "Reader is not defined" issue without breaking existing tests.