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.In the test cases there is ['19--45=5?', -1]. So if I understand correctly the expressions is : 19 - (-45) = 5(-1) ?? The result should be 64 no? Also don't know how the missing number could be a negative number when the number its missing from is positive?
Interesting Kata. Though I can't figure from where do I get the original array paramaters from? from inside my pipe method, I have 'this' and my one argument which is the second funciton to pipe to, my problem is I have no way (that I know of) to access the original array params following the format of: [1,2,3,4].map(addOne(pipe(square)); How does the initial addOne even receive the iterated array paramater? Any help would be appreciated
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 :)
Bug still here, I've updated the default test cases to workaround this issue.
I've updated the test cases with a FileReaderSimulator to bypass the "ReferenceError: Reader is not defined" error when testing.
Note: this is a codewars bug and even though the staff is hyper reactive, bug is still here...
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.
This comment is hidden because it contains spoiler information about the solution