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.
The "," command takes 1 byte from input and puts at the data pointer. So, if we have "Code" input the code ",." will output 'C'. The ",,." should return 'o'. Atleas it is as I understood the assignment.
OP solved it, closing
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.
Yes, BF works on a memory of byte cells which the datapointer points to. This you have to initialize/manage yourself. Maybe you should read the Wikipedia article linked in the description.
O(n)
Hi,
Not a kata issue, and actually not an issue at all: this is sort of "by design". Forbidding this would involve destorying a lot of features that make for cw's identity/way of working, so it won't happen.
Now, please note that what you used is considered an actual cheat and can lead to banishment when used "to some extent". I hid your solution, but don't use that again.
Cheers
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?
How might you interpret a number as negative?
foo-001 could easily be seen as the number "001" after the string "foo-"
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?
Thank you. I had not seen String.prototype.someFunction before and I was confused about how to access the input string :)
You need to look for composition here is a good introduction by Eric Elliott https://medium.com/javascript-scene/composing-software-an-introduction-27b72500d6ea
Loading more items...