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.
Nice Kata overall. Nice to use OOP for once whereas you can get away with static methods for most other Katas (Java).
Surprised there was no tests and it would have clarified things about the task however, was still good as I actually wrote a whole suite of tests on a Kata for once.
I feel like an example could be used for 0 itemIndex as I wasn't reading properly and unsure whether item was indexed or not.
helper.pageIndex(0); //should == 0 (itemIndex = 0, pageIndex = 0)
Are we supposed to use recursion? I thought the Kata suggests so but after finishing I saw loads of solutions that don't.
Accidentally cheated the Kata. Really needs a fix. I thought
is something missing?
. Well ... can see my thought process in my solution.But looking at the solutions, no idea how people came to the conclusion for bomb #IsSomethingMissing?
I don't understand the task. The inputs are string of
code
that does xyz, I understand. Byte array from the String also given asinput
which you use only when,
code is reached?? Everything else, I don't. Am I supposed to initalise a byte list/array and use this with the data pointer? Or is that from the Stringinput
??(Javascript) Test cases doesn't include negative numbers. My solution passed this Kyu but custom tests fails with negative numbers.
Gosh I feel dumb.
What's the big O notation for this?
This comment is hidden because it contains spoiler information about the solution
Are the random tests wrong?
input: [37, 1, 10, 87, 47, 47, 21, 64, 92, 94, 28, 7]
returned:
[1, 20, 261, 188, 235, 126, 448, 736, 846, 280, 77]
but should equal[20, 522, 564, 940, 630, 2688, 5152, 6768, 2520, 770]
The expected answer is the derivative of the derivative but I'm only expecting it to be done once.
Didn't realise suggestions meant suggested changes for the question. Thought it simply was there to help people solve it. My bad
For JS
this.valueOf()
returns you the actual string to manipulate.use
this.valueOf()
which provides the actual string which to use. I've spend hours looking for in documentation only to stumble onto it accidentally in my IDE.