Simple Swift Solution
Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n\nclass Solution {\n    func destCity(_ paths: [[String]]) -> String {\n        let
# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```\nclass Solution {\n    func destCity(_ paths: [[String]]) -> String {\n        let from = Set(paths.map { $0[0] })\n        let to = Set(paths.map { $0[1] })\n        let destCity = to.first { !from.contains($0) }\n        return destCity ?? ""\n    }\n}\n```
['Hash Table', 'Swift']