why is "wertf" not a correct output for ["wrt","wrf","er","ett","rftt"]?


  • 1
    I

    Input:
    ["wrt","wrf","er","ett","rftt"]
    Output:
    "ewrft"
    Expected:
    "wertf"

    Shouldn't "werft" and "ewrft" both be correct since there's not ordering between "w" and "e"?


  • 0
    U

    because "wrf" is before "er", so w is before e.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.