Ad
  • Custom User Avatar
    Order by size:
    
    Actual:
    [ { name: 'puppy', type: 'potion', color: 'blue', size: 10 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 13 },
      { name: 'lamp', type: 'animal', color: 'purple', size: 19 },
      { name: 'scarf', type: 'potion', color: 'green', size: 28 },
      { name: 'glass', type: 'animal', color: 'purple', size: 36 },
      { name: 'pillow', type: 'furniture', color: 'red', size: 37 } ]
    
    Expected:
    [ { name: 'pillow', type: 'furniture', color: 'red', size: 37 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 10 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 13 },
      { name: 'lamp', type: 'animal', color: 'purple', size: 19 },
      { name: 'scarf', type: 'potion', color: 'green', size: 28 },
      { name: 'glass', type: 'animal', color: 'purple', size: 36 } ]
    
  • Custom User Avatar

    The user's solution may be swapping elements with the same ordering thus failing sometimes, but there're not enough tests to catch this.

  • Custom User Avatar

    This is a random test from the reference solution:

     Test 98/100: onarij-ar onij niùn-ij
    expected
    [ { name: 'teardrop', type: 'clothing', color: 'blue', size: 60 },
      { name: 'wand', type: 'tool', color: 'blue', size: 16 },
      { name: 'glass', type: 'animal', color: 'colorless', size: 26 },
      { name: 'vest', type: 'potion', color: 'green', size: 35 },
      { name: 'glass', type: 'potion', color: 'red', size: 39 },
      { name: 'vest', type: 'animal', color: 'yellow', size: 45 },
      { name: 'socks', type: 'potion', color: 'blue', size: 66 },
      { name: 'pants', type: 'furniture', color: 'green', size: 67 },
      { name: 'lamp', type: 'furniture', color: 'yellow', size: 72 },
      { name: 'vest', type: 'tool', color: 'green', size: 96 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 102 }
    ]
    to deeply equal
    [ { name: 'teardrop', type: 'clothing', color: 'blue', size: 60 },
      { name: 'wand', type: 'tool', color: 'blue', size: 16 },
      { name: 'glass', type: 'animal', color: 'colorless', size: 26 },
      { name: 'vest', type: 'potion', color: 'green', size: 35 },
      { name: 'glass', type: 'potion', color: 'red', size: 39 },
      { name: 'vest', type: 'animal', color: 'yellow', size: 45 },
      { name: 'socks', type: 'potion', color: 'blue', size: 66 },
      { name: 'pants', type: 'furniture', color: 'green', size: 67 },
      { name: 'lamp', type: 'furniture', color: 'yellow', size: 72 },
      { name: 'vest', type: 'tool', color: 'green', size: 96 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 102 }
    ]
    

    Something's wrong. Not always, but sometimes, the sorting's wrong for onij.

    I haven't been able to figure out what, sorry.

  • Custom User Avatar

    Typo in description:

    As such, onarij-ar niùn onij means

    Should be

    As such, onarij-ar niùn-ij onij means

  • Custom User Avatar

    All kinds of things are checked. But not if the iterator actually finishes.

    ( The example tests time-out, of course. )

  • Custom User Avatar

    It's not ( quite ) as bad as Fibonacci - but there are a dozen other Collatz kata. Generators have been done before as well.

    Is this new enough?