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 comment is hidden because it contains spoiler information about the solution
Do you see the first there? You have to return
boatshoes
in that case (if k is 2 ofc).Yeah, this should be 8 kyu right?
What does this code mean? Is this an IFEE?
What does this code mean? is this a sample of IIFE?
@Voile, That link you gave was a hardcore version of this Kata, since this kata doesn't have test case for very long integers.
This comment is hidden because it contains spoiler information about the solution
Right. With that in mind the solution is smaller, and passes all test cases. Thanks for your patience!
You're missing the consecutive part. No faulty test.
'ixoyx', '3452' and 'zzzzzzzzzzzz' are one after the other, 'wkppv', 'ixoyx', and 'zzzzzzzzzzzz' are not ('3452' is between the last 2).
OK, even when carefully keeping the order, there's a faulty test case:
['it', 'wkppv', 'ixoyx', '3452', 'zzzzzzzzzzzz'] 3
'wkppvixoyxzzzzzzzzzzzz' should equal 'ixoyx3452zzzzzzzzzzzz'
The 3 longest strings are (in order): 'wkppv', 'ixoyx', and 'zzzzzzzzzzzz',
so the expected result should not be 'ixoyx3452zzzzzzzzzzzz'.
No, what he did was sorting the strings in descending length order, then returning 2 joined, what is wrong. But what you said maybe help him to clarify what to do in that case.
I experienced this too. You must have encountered something like this [boat, shoes, boat, shoe], where the expected is boatshoes yet your code returned shoesboat. I think it must return the first consecutive longest string, in this case boatshoes.
You're changing the order of the strings. The expected value is ok.
Some test cases are simply wrong. Eg.
'owiaxujylentrklctozmymuwlwsasphmxx' should equal 'wlwsasphmxxowiaxujylentrklctozmymu'
which should not.
For random testing what if array combinations are equals in length?
[boat, shoes, boat, shoe]
should it return boatshoes? or shoesboat? I passed 166 test and failed 43.
Loading more items...