The given correct answer is "wertf". But the last word in the input is "rftt", 'f' is in front of 't'. The given correct answer should be wrong, because 'f' is behind of 't'.
Is there something wrong?
the last word in the input is "rftt", 'f' is in front of 't'
If you see the word "cat" in an English dictionary, do you then think that "c" comes before "a" in the English alphabet?
How about the case:
input: ["wnlb"] output: "blnw"?
There is no way we can get the order of chars in this input, so I treat the order invalid and return "", but the oj gives error.
Oj treats it as a valid input, and return "blnw"
@hpplayer It's not invalid (like for example ["a","b","a"]) but has multiple valid orders. So you shouldn't use note 2 but note 3.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.