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.
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 :)
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.
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..
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....
only the ages have to be in acending order if you order by names as well you will fail.
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.
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"}
The names are not in ascending order. Both "don" and "cat" have the same age, but "cat" should come before "don".
If you just sort by age like it says you will be fine :)
This comment is hidden because it contains spoiler information about the solution
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.
what do you mean by that? The test cases matches the one in the description and the ones in the example test cases
The test cases don't match the test cases being ran against it.