Wrong answer!

  • 1

    I tried [["JFK", "LGA"],["JFK", "LGB"]] as a test case and got this as expected answer:

    Two concerns regarding the expected answer:

    1. How could this be valid answer when there is no flight between LGB->LGA?
      Does the itinerary ["JFK","LGB","LGA"] implies that there should be a valid flight between "JFK"->"LGB" & "LGB" ->"LGA".
    2. Also shouldn't LGA come before LGB as per lexical ordering?

Log in to reply

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