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.
Given initial array
The first entry of the reference solution is
{"wr":["wrriirryyVVyyHHyyNN6","wrriirryyVVyyHHyyNNvvEEOORRaab"]}
. This doesn't satisfy the rule that chains in each of resulting array's element's value should respect initial array's elements order. You can't continue the chain afterwrri
becauseri
is the last element.Also, I would expect the solution to start with
{"KJ":["KJJc",...]}
. But that's another issue.Please fix the solution or describe the problem better.
Random tests break if input is modified from user code.
Reference solution is obviously wrong: it rejects any keys that contain the pattern
AbbA
if bothAb
andbA
are in the input list.The reference solution as used in the random tests uses the native JS
[].sort
, which is unstable. That meansis not guaranteed in the reference solution.
I think I'm running into this: I pass the Example tests, I take great care to sort stably, I fail the Submit tests, but I cannot debug because I'm f***ing drowning in data.
I'm not 100% sure this is a kata issue, but I'm marking it as such because I am 99.99% sure.
The Submit tests are useless for debugging because of sheer data overload.
Include random tests of smaller samples as well, because not all bugs can be fixed by training on the Exemple tests.
The
Sample Tests
block in the actual tests are actually random tests, so it shouldn't be described as sample tests.Speaking of which, fixed tests should be added either.
Why is the return type a string of an array of ints joined together? Can't you just let us return the array?
I'm sorry, I don't get it.
What should be alternating?
If condition 3 is to be satisfied only after 1 and 2, "make sure" may not be the best expression.
See 2.
At least I suppose the order is to be according to (1), then (2), then (3), then (4). Or should they be true all at the same time?
The example does not clarify things for me either.
A=8, B=10, N=505896 Expected: 'Yes', instead got: 'No'
505896 has 19 digits (
1111011100000101000
), so the answer is clearly ano
.I sometimes see numbers like
19994234643820868
appearing in the random tests, which is above safe integer range.Input range is missing.
If you're using numbers close to safe integer range in random tests (hence there are performance/precision concerns), there should be indications.
Can the possible binary number start with
0
?The description could also mention any possible input restrictions - is this a programming challenge or a maths challenge? Is brute force acceptable, or are we supposed to conjure black magic ( OK, OK, number theory ) ?
I suspect your reference solution has a horrible bug. Note that you have no solutions.
What would be the expected outcome for
(["ab","ba"])
? If it's not{ ab:[abba], ba:[baab""] }
, you should update the description. If it is, take a good look at your reference solution.Generating ridiculously long input arrays for the random tests isn't helping - it's almost imposible to debug because you're drowning in data. I'm not getting time-outs - I'm getting console overflows from printing all the actual and expected values. ( Also, use
Test.assertDeepEquals
. Yes, it's undocumented. )Sort of an issue:
All the chains in the fixed tests have elements in sequential order in which they appear in the
data
array, but random tests apparently assumes the opposite. (And it's not clear in the descriptions that it's the case either.)PS1: Chains in each of resulting array's element's value should respect initial array's elements order.
In what order? First by length and then...?