Wrong test-case?


  • 0
    C
    Input:
    ["ab","adc"]
    Output:
    "abd"
    Expected:
    "abcd"
    

    In this test-case, how can we derive that c comes before d and after b? Am I missing something?


  • 0
    K

    @coderholic This question's return is problematic. In this case "b < d" is known, "a" and "c"' remain unknown order. But you are required to insert those unknowns to ordered set and still maintain the known order, such as "bdac" or "abcd", they are all valid. Confusing and doesn't make sense to me though.


Log in to reply
 

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