C++|| EASY TO UNDERSTAND || FAST || using maps
Please upvote to motivate me in my quest of documenting all leetcode solutions(to help the community). HAPPY CODING:)\nAny suggestions and improvements are alwa
**Please upvote to motivate me in my quest of documenting all leetcode solutions(to help the community). HAPPY CODING:)\nAny suggestions and improvements are always welcome**\n```\nclass Solution {\npublic:\n    string destCity(vector<vector<string>>& paths) {\n        unordered_map<string,string> mp;\n        int n=paths.size();\n        for(int i=0;i<n;i++)\n        {\n            mp[paths[i][0]]=paths[i][1];\n        }\n        for(int i=0;i<n;i++)\n        {\n            if(mp.find(paths[i][1])==mp.end())\n            return paths[i][1];\n        }\n        return "";\n    }\n};\n```
['C']