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.
Correct the description please,
nextPal(191) == 292
should be
nextPal(191) == 202
Thanks!
Nice one!
There's typo in the description, you missed a "4" in the array (should be three "4"s instead fo two).
[1,4,4,0,4,3,3,1] # should return [1,12,0,4,6,1]
Got it, thanks!
This comment is hidden because it contains spoiler information about the solution
Clean and elegant solution.
JS power :D
Awesome, thanks!
It seems that there are no test-cases for checking unique values on columns.
Could you please add some?
I get your point. For the purpose of this kata, what would you do to improve it?
Thanks!
Hello guys,
@xcthulhu, nice kata!
But could you please explain this part?
add_ = defaultArguments(add_,{b:3, a:2});
I'm having some trouble in understanding why
add_
is being called here.Am I supposed to extract the callback from a previously declared variable?
Thanks!
Done!
You are absolutely right, thank you!
The kata is updated as such: it should return true/false, nothing else.
Hello,
Thanks for your review, just rechecked my old solution and it did not pass (strange :) )
Seems like some test cases were incorrect, but now they are updated.
I'm comparing the result this way,
if it should return true, then -- Test.assertEquals(results1.hasJuice(240, 210, {extra:3, minutes:9}).true, 1), where 1 is the value of true, eg {true:1}
if it should return false, then -- Test.assertEquals(results1.hasJuice(240, 330, {extra:3, minutes:9}), false)
Am I getting this wrong?
Thanks,
Michael
Hello, I see your solution returns undefined (using the example tests).
Try defining the
extra()
method outside ofhasJuice
. It works for me.I'm leaving town, and I need my phone to have enough battery to last
needFor
minutes. I will be speaking/playing on it foractiveUse
minutes. Of course, battery is still consumed (as idle time), whether I'm speaking/playing or not, but idle time consumes much less battery than activeUse.If activeUse is greater than needFor, then the solution should definitely return false.
Loading more items...