Ad
  • Default User Avatar

    CS:
    I think the labeling in the error message is reversed for the following tests: RandomBig, RandomFull, RandomTestsAlmostEmpty, and RandomTestsManyShare

    Example:
    RandomTestsAlmostEmpty

    Test Failed
    Expected: null

    But was: < 66, 16, 4, 55, 76, 55, 36, 5, 34, 1, 35, 57, 60, 86, 6, 12, 16, 66, 60, 26, 19, 84, 40, 66, 26, 43, 26, 60, 26, 66, 43, 23, 77, 26, 50, 23, 66, 60, 74, 88, 43, 23, 12, 38, 6, 60, 85, 43, 57, 60, 6, 38, 21, 32, 20, 50, 74, 50, 50, 16, 40, 6, 2, 79, 43, 6, 66, 83, 77, 79, 12, 66, 2, 66, 32, 43, 40, 50, 26, 79, 86, 57, 6, 21, 79, 12, 43, 36 >

  • Custom User Avatar

    approved by someone

  • Custom User Avatar

    These sorting algorthims are always so sophisticated to program.

  • Custom User Avatar

    Approved by 🧙

  • Default User Avatar
  • Custom User Avatar

    I agree with Johan on this one. The performance constraints are tedious. Also, when adding performance constraints you should at least have a section in the description describing those constraints.

  • Custom User Avatar

    You allow mutation of input to interfere with test cases.

  • Default User Avatar

    Apparently 'groupBy' is supposed to keep the order of the input data. But with 'orderBy' entries with the same key should get a different order? That makes no sense in my opinion. What is the logic that 'scientific' must be before 'teacher'?

    var persons = [
      {name: 'Peter', profession: 'teacher', age: 20, maritalStatus: 'married'},
      {name: 'Michael', profession: 'teacher', age: 50, maritalStatus: 'single'},
      {name: 'Peter', profession: 'teacher', age: 20, maritalStatus: 'married'},
      {name: 'Anna', profession: 'scientific', age: 20, maritalStatus: 'married'},
      {name: 'Rose', profession: 'scientific', age: 50, maritalStatus: 'married'},
      {name: 'Anna', profession: 'scientific', age: 20, maritalStatus: 'single'},
      {name: 'Anna', profession: 'politician', age: 50, maritalStatus: 'married'}
    ];
    
    Test.assertSimilar(query().select(professionCount).from(persons).groupBy(profession).orderBy(naturalCompare).execute(), [["politician",1],["scientific",3],["teacher",3]]);
    
  • Default User Avatar

    same. realistically a league wouldn't contain such large amount of teams

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    When I Test my Code locally, it passes all Tests, but when i test it on Browser it just fails at test example3. I cant see any way how to debug the test and I cant understand any of the logs. Could you please correct this issue?

  • Custom User Avatar

    You have to return a list.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Some of these tests are a little excessive. I am passing all the sample tests, but can't pass the final tests and can't compare because they're all too long to read and just say, "and x others"

  • Loading more items...