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.
Fixed.
Added tests with
0
sSometimes the tests generate no zeroes which allows solutions to do incorrect short-circuit evaluation.
That's actually an issue.
The user can modify the input.
Right, fixed!
JohanWiltink's suggestion is a good improvement since it corrects the confusion around the second and third parameter.
And my confusion came from the examples where a third parameter isn't included AND one array is shorter than the other one, in which case the padding is done using 0s. I can see how that was a misinterpretation on my behalf.
third parameter is missing in javascript sample code
"If one array is shorter than the other, use the optional third parameter (defaulted to
0
) toor
the unmatched elements."This should say the third parameter.
And what gave you that idea?
Could you suggest a better wording?
Bit of criticism: it wasn't made clear (to me, at least) that when a third parameter is supplied, then the padding of whichever array/list is shorted should be done using that third parameter. I assumed it had to be used once, and then (if necessary) pad with 0s.
This comment is hidden because it contains spoiler information about the solution
Nope, it will be
"ccbaa"
because the thirdb
hasn't been "used" yetLoading more items...