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.
i love you
If there is no need to keep state between calls, the class is completely useless and should be removed.
Is it? The default code is still typed as Number[] but the hidden tests are sending it String[], causing them to fail unless you change the type to any[] or similar (object[] would probs work though I didn't try it). If that's intentional on an 8 kyu there should at least be some hint in the description.
added
I really struggling with extracting data. I have no idea how to use the pixel class.
I have figured out that I can pass the first test using this method.
image.forEach(i =>{
j = i.length;
for(j = 0; j < i.length; j++){
i[j].g = 155;
}
})
This comment is hidden because it contains spoiler information about the solution
The test are thorough. You implemented what was required. The description doesn't state that you have to explicitly order the result. Regards, suic
Isn't the first link with the table working for you?
you have no idea how close I was to start digging into either HTML5 or P5, just to see and debug it... :D
I've just added a performance tag.
I had en error in my code that caused an infinite (or at least very long, I was unable to solve the halting problem while debugging) loop for that specific piece of input. It was caused by the usual culprit - faulty assumptions.
Full disclosure: I printed the incoming (n,x) to stderr so that I was able to debug my code locally and figure out the problem.
I've added the upper bound for alien count in the Description, so that should give a reasonable idea of the performance requirements.
I ran the tests a few times and the most number of aliens I got was
228
, a figure which also includes0
s (for blank spaces between aliens) so the actual number may be closer to around200
max. I didn't put a performance tag because it didn't seem to necessitate one. A completely naive solution may not work too well, but this kata doesn't require any special optimizations to pass.Thanks, I've updated the description to remove any confusion about that.
Loading more items...