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.
This solution has a time complexity of O(n) which makes it the most efficient for larger data sets.
This comment is hidden because it contains spoiler information about the solution
can anyone explain that to me ?
No, it was my bad. Everything okay.
I think i did it right but got this error.
Response received but no data was written to STDOUT or STDERR.
added
No sample tests.
!
The kata is semi-broken in that attempting to submit always runs a
console.log
, which uses.call
, which means… if you don't have the solution, you cannot debug it at all. HOWEVER, when you do get the solution, it does work, becauseconsole.log
now works and you are able to submit.So, the kata is actually functional — just annoying.
This comment is hidden because it contains spoiler information about the solution
Because the Kata has to disable the
Function.prototype.call
, the whole Kata framework is going to crash until you re-implement that correctly.In particular, none of the
Test
methods will work unlesscall
works correctly.The CodeWars framework internally uses
call
so if your implementation isn't correct, nothing will work.Note that even if you haven't used
console.log
, all of the tests log something. It's internally using the same framework.This Kata is broken.
Thank you for the answer, but still don't understand. Personally I don't use log function in my code. And any call to call function handels by my custom Function.prototype.call.
The kata description contains a message saying that
console.log
internally usesFunction.prototype.call
, so it looks likelog
may have been disabled for this kata.Loading more items...