Python - 1 Set. Faster than 98%
Time Complexity: O(N)\nRuntime: Faster than 98% (as of May 11th, 2020)\nExplanation:\nStep 1: Add departure cities paths[i][0] to a set.\nStep 2: For each paths
<b>Time Complexity:</b> O(N)\n<b>Runtime:</b> Faster than 98% <i>(as of May 11th, 2020)</i>\n<b>Explanation:</b>\nStep 1: Add departure cities ```paths[i][0]``` to a set.\nStep 2: For each ```paths[i][1]``` check if it\'s in the set. If it\'s NOT, it\'s the <b>destination</b> city.   \n\n```\ndef solution(paths):\n    s = set(p[0] for p in paths)                  \n    for path in paths:\n        if path[1] not in s:                         \n            return p[1]\n```\n\nIf you like my solution and/or find it useful, please upvote :) Thank you.\n\n\n\n
[]