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.
Great kata ^^
Yup that does make sense. I mentioned to start from index 0 to indicate starting from left to right but have added your line as it makes it much clearer, thanks!
Heya! Fun kata, but I ran into a few problems.
Your reference solution has a left -> right bias in terms of parsing the string.
Eg.
peelPairs('12251', 6)
:221
. Total distance between the pair characters(1, 5)
is3
. This is the result the reference produces.122
. Total distance between the pair characters(1, 5)
is1
, they're adjacent. This is closer than the acceped solution, but will not be accepted.Given that the instructions state
they should be paired with the closest digit to them that sums to n
, I think you should clarify the instructions to includeclosest digit **to the right** of them that sums to n
.Hopefully that makes sense :D
Approved
;-)
Thanks, the empty string should now no longer occur as a key or value.
;-)
There are objects with empty string keys in the random tests, which nothing has said about how to handle them.
Good catch, now both random and fixed tests should be the correct way around.
how is that fixed ? check below !
Thanks, test results should now be the right way around.
It appears your 'Expected' and 'Instead got' are reversed.
Can confirm it's fixed, was just investigating this myself and it suddenly started passing the test cases.
Mm you look confused? ;)
Confirm it is fixed. o_O
Loading more items...