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.
Yea, this is strange. It passes other test cases, it's only failing on tests marked "Should work for random arrays". So for random array arr => [71,66,23,31,64,30,24,19,56,9,14,53,62,5,27,33,4,57,58,16,68,47,21,38,78,70,7,50,76,28,55,73,32,8,35,37,72,13,17,59,74,20,77,40,69,61,6,65,18,63,1,2,54,25,11,43,29,36]
The test returns: ✘ Expected: '', instead got: '1-2, 4-9, 11, 13-14, 16-21, 23-25, 27-33, 35-38, 40, 43, 47, 50, 53-59, 61-66, 68-74, 76-78'
So as a test, I returned '' in my code and all (20) test cases for "Should work for random arrays" passed. And the others failed. Which I expected.
Example: arr => [39,25,48,29,14,30,28,49,52,38,17,47,53,51,37,16,10,4,7,5,35,33,23,42,60,8,13,59,34,6,11,19,45,15,50,1,54,31,43,3,46,18,20]
This is weird. I will try again and see if I have better luck.
I'm failing the random test cases and I can't figure out what the issue is. For example, on Input array: [27,13,12,29,53,41,24,20,19,40,44,31,5,36,25,50,15,22,30,26,17,21,11,32,38,43,46,34,18,14,39,35,3,51,33]
I get the following failure message:
Expected: '', instead got: '3, 5, 11-15, 17-22, 24-27, 29-36, 38-41, 43-44, 46, 50-51, 53'
Why is it expecting an empty string? What am I missing?
Thanks Steve!!
Hi Steve,
I see in a thread below, you were going to limit the max values of n and l to 100 and 15 respectively in the random tests. Has this been done?
I am attempting the kata in javascript. The test fails on big numbers. Example input: n=84 and l = 64.
Interesting kata. That "no loop" restriction threw me off.
C# translation kumited