Ad
  • Custom User Avatar

    haha, No worries and there's no need to downvote yourself, I don't think it changes anything besides points if it is downvoted. I'm just glad we got you to pass this kata and good luck with future ones :)

  • Custom User Avatar

    Looks I can't edit my own comments that people have responded to. Ignore me, don't code with no sleep. Sorry, matt c!

    EDIT: Downvoted myself so hopefuly people do not see it.

  • Custom User Avatar

    As the description states you should return the input array sorted by age in ascending order and that means Just do that.. If there is a tie, don't do anything if names are the same, don't do anything. I'm going to mark as resolved because there is no real issue, 365 people have completed this kata by reading the description. I understand what you mean and in other kata's I have accounted for ties and made people sort by names if there is one but in this kata it is a 7kyu because you just have to return an array sorted on one property and nothing else..

  • Custom User Avatar

    That's because you aren't supposed to do anything if the ages are equal... Just sort by age and in ascending order and you will pass....

  • Custom User Avatar

    only the ages have to be in acending order if you order by names as well you will fail.

  • Custom User Avatar

    Don't waste your time on this one. Too many test cases are faulty. Kata doesn't specify how you should handle sorting if ages are equal (i.e. should names be in ascending or descending order) and has test cases that handle it differently. Basically stuck submitting and hoping for enough test cases in a row to handle it consistently.

  • Custom User Avatar

    You have this issue in multiple test cases. I ran into it again. The following was the expected result.

    {"age":63,"name":"joe"},{"age":63,"name":"chosen one"}

  • Custom User Avatar

    The names are not in ascending order. Both "don" and "cat" have the same age, but "cat" should come before "don".

  • Custom User Avatar

    If you just sort by age like it says you will be fine :)

  • Custom User Avatar

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

  • Custom User Avatar

    I ran into this as well. Saved a reference to the start of the list and traversed it again after finding the loop size and deleting the property I created.

  • Custom User Avatar

    what do you mean by that? The test cases matches the one in the description and the ones in the example test cases

  • Custom User Avatar

    The test cases don't match the test cases being ran against it.