C++ Solution
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string destCity(vector<vector<string>>& paths) {\n \n    unordered_set<string> s;\n    int n=paths.size();\n    for (int i = 0; i < n; i++)\n        s.insert(paths[i][0]);\n\n    string ans;\n    for (int i = 0; i < n; i++)\n        if (s.find(paths[i][1]) == s.end())\n            ans = paths[i][1];\n    return ans;\n\n    }\n};\n```
['C++']