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.
Haha, I guess so, I managed to have a few tests succesful and mostly have the good behavior for the elevator, but I have some troubles and I don't even know where or why nor how to ask a question about it.
You are sort of right, do not expect this one to be easy, I'm stuck on this for +5 days, and still a couple of final tests are failing
I'm new to data structures, is it related to queuing and dequeuing by any chance ? that would give me a precise idea of what to learn to solve this kata
Isn't this solution potentially costly in performance ? (junior developer looking to do best here :) )
Aight, thx for the answers. I'll need to read all that quite a few times and let it cook a little.
You have the correct idea about deep ( or maybe shallow, see above ) copies and mutating the array itself.
Documentation can tell you which methods work by mutation and which by returning a new value.
Mutating input values will mutate it at the called site as well as at the call site, which is dangerous in general and will explicitly fail you in this kata.
Look into the difference between "pure code" and "programming by side effect". Impure code is the source of a lot of very preventable bugs.
This comment is hidden because it contains spoiler information about the solution
I don't know Java ( at all. but I had just seen the term "arrayList" in a Java context ), and I don't understand exactly what your problem is. I'd love to help you, but "I don't understand the mechanism" doesn't tell me what you are not understanding.
My bad, I initially thought js builtins arrays was some kind of improved arrayList.
Then, I don't understand the mechanism at all, even after looking at the docs for js arrays or the solutions to this kata.
JavaScript is not Java. JS does not have Lists or ArrayLists. JS Arrays are fully dynamic; there is no size limit at any time ( apart from a general maximum size of ridiculous ).
This kata is so confusing tbh, what I understand is there's a max limit to the initial number of values of an array (normal, it's an arrayList).
But usually arrayLists in js (arrays) resize automatically if the number of values is bigger than the inital max value no ? Even after seeing the doc, I still don't get the mechanism behind it.
I didn't drink and still manage to spat out my drink
This comment is hidden because it contains spoiler information about the solution
interesting way of doing recursion ! nice
woah, so that's what it was
Loading more items...