Output order wrong - please explain why


  • 0
    N

    Hi,

    Please explain how and why my output is wrong. Is ADL not lexically smaller than AUA? Or is it that the AXA following AUA has to be taken into consideration?

    Output:
    ["JFK","AXA","AUA","ADL","ANU","AUA","ANU","EZE","ADL","EZE","ANU","JFK","AXA","EZE","TIA","ADL","EZE","HBA","AUA","AXA","TIA"]
    Expected:
    ["JFK","AXA","AUA","ADL","ANU","AUA","ANU","EZE","ADL","EZE","ANU","JFK","AXA","EZE","TIA","AUA","AXA","TIA","ADL","EZE","HBA"]

    Thanks,
    Nikhil


Log in to reply
 

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