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.
Is there a specific reason why i have this as initial code?
// return the two oldest/oldest ages within the array of ages passed in.
// it should return the two ages as a sorted array, youngest age first
function twoOldestAges(ages){
}
Failed asserting that two arrays are equal.
Expected: Array (
0 => 'Yuuuge!!'
1 => 'uuu'
2 => 'none'
)
Actual : Array (
0 => 'uuu'
1 => 'Yuuuge!!'
2 => 'none'
)
Hey, i tried your Kata and in my opinion your tests arent right.
In the failured case the test give ("none", "uuu", "Yuuuge!!").
My solution is ("uuu", "Yuuuge!!", "none") but the test expect ("Yuuuge!!", "uuu", "none").
Your explanation says: "If two or more strings in the array have maximum sub-strings of the same length, then the strings should remain in the order in which they were found in the orginal array."
So "uuu" has substring size of 3 and "Yuuuge!!" also. So my solutuion is right because same sub string size means in the order which they were found.
Hope you or someone else can me explain this problem.
nice one