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.
Fixed!
It's been a month from your comment and the initial code is still the same.
Is there any reason why this is here?
// 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){
}
It shouldn't be the case. Try hitting the 'reset' button.
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){
}
resolved
Rob3012 the kata is working fine, but there was a problem in how the results from the tests were reported. The "Actual" and "Expected" tags on the results were flipped. I have now switched the labels -- try the kata again.
resolved. I appreciate it.
No random tests in PHP.
Failed asserting that two arrays are equal.
Expected: Array (
0 => 'Yuuuge!!'
1 => 'uuu'
2 => 'none'
)
Actual : Array (
0 => 'uuu'
1 => 'Yuuuge!!'
2 => 'none'
)
Actual/expected values are flipped in PHP.
The expected result for
["none","uuu","Yuuuge!!"]
is["uuu","Yuuuge!!","none"]
. Not an issue.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