Ad
  • Default User Avatar

    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){

    }

  • Default User Avatar

    Failed asserting that two arrays are equal.
    Expected: Array (
    0 => 'Yuuuge!!'
    1 => 'uuu'
    2 => 'none'
    )
    Actual : Array (
    0 => 'uuu'
    1 => 'Yuuuge!!'
    2 => 'none'
    )

  • Default User Avatar

    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.

  • Default User Avatar