Ad
  • Custom User Avatar

    Given initial array

    [
      'KJ', 'JK', 'wr', 'Dk', 'N6', 'oU', 'Uo', 'sX',
      'Kc', 'cK', '5A', 'A5', 'xT', 'Tx', 'RO', 'OR',
      'yV', 'Vy', '8Q', 'qq', 'KM', 'MK', 'kQ', 'Qk',
      'Hy', 'yH', 'BQ', 'QB', 'jP', 'Pj', 'ZN', 'wI',
      'Iw', 'Yo', 'oY', 'EO', 'Yx', 'xY', 'cJ', 'Jc',
      'yr', 'ry', 'fe', 'ef', 'll', 'll', 'Hq', 'U5',
      'g3', '3g', 'BB', 'yN', 'Ny', 'A0', '0A', 'Nv',
      'aR', 'Ra', 'Po', 'oP', 'ab', 'p2', '2p', 'wd',
      'dw', 'Ev', 'vE', 'pm', 'ir', 'ri'
    ]
    

    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 after wrri because ri 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.

  • Custom User Avatar

    Random tests break if input is modified from user code.

  • Custom User Avatar

    Reference solution is obviously wrong: it rejects any keys that contain the pattern AbbA if both Ab and bA are in the input list.

  • Custom User Avatar

    The reference solution as used in the random tests uses the native JS [].sort, which is unstable. That means

    keep initial order of items of the same type

    is 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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Why is the return type a string of an array of ints joined together? Can't you just let us return the array?

  • Custom User Avatar

    I'm sorry, I don't get it.

    1. Within each room group order all items so that they're alternating with each other;

    What should be alternating?

    1. Make sure, that types have ascending order;

    If condition 3 is to be satisfied only after 1 and 2, "make sure" may not be the best expression.

    1. When alternating

    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.

  • Custom User Avatar

    A=8, B=10, N=505896 Expected: 'Yes', instead got: 'No'

    505896 has 19 digits (1111011100000101000), so the answer is clearly a no.

  • Custom User Avatar

    I sometimes see numbers like 19994234643820868 appearing in the random tests, which is above safe integer range.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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 ) ?

  • Custom User Avatar

    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. )

  • Custom User Avatar

    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.)

  • Custom User Avatar

    PS1: Chains in each of resulting array's element's value should respect initial array's elements order.

    [ 'AB', 'AD', 'DB', 'BC', 'BS', 'CE' ]
    Expected: '[{"AB":["ABBS","ABBCCE"]},{"AD":["ADDBBS","ADDBBCCE"]},{"DB":["DBBS","DBBCCE"]},{"BC":["BCCE"]}]'
    

    In what order? First by length and then...?