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'm a little lost with your code; I don't see the
memoryAlloc
function anywhere here so I don't know where you're trying to start executing without really reading it all over. Also, you're doing a couple things likefindHighestValue()
which isn't necessary; it's true that using built-in methods for finding the max in JS is slower than writing one yourself, but here it isn't necessary. If you're timing out even on the first test, it's very likely you're running into an infinite loop somewhere.This code must be a joke. You're reinventing the wheel with every helper function, using wrong comparison operator, it can't pass the sample tests (which are obviously a part of main test suite); damn, it can't even pass 15(!) random tests out of 250.
I can see you trying to do it the right way, but this is a disaster.
you need to return true or false from the function, hence the ===