Ad
  • Default User Avatar

    In description : return the first longest string consisting ......
    It need to begin at the first longest string.

  • Default User Avatar

    I tried to print the random test's arguments.
    They are below:
    array(3) {
    [0]=>
    string(11) "wlwsasphmxx"
    [1]=>
    string(23) "owiaxujylentrklctozmymu"
    [2]=>
    string(10) "wpgozvxxiu"
    }
    k is 2

    Then it tell me :
    Failed asserting that two strings are equal.
    Expected: 'wlwsasphmxxowiaxujylentrklctozmymu'
    Actual : 'owiaxujylentrklctozmymuwpgozvxxiu'

    I don't know why it begin from "wlwsasphmxx"? "wlwsasphmxx" is not longest, right?

  • Default User Avatar

    If there are many the same length strings in it.
    ['AAA','BB', 'C', 'DDD', 'EEE', 'FFFFFF']
    K = 2

    which one is it should return FFFFFFAAA or FFFFFFAAADDDEEE?