JS very fast and easy solution with hashmap
\n\n\nvar destCity = function(paths) {\n    const hashmapStart = {};\n    const hashmapEnd = {};\n    \n    for (let i = 0; i < paths.length; i++) {\n        ha
![image](https://assets.leetcode.com/users/images/033f02f0-6bb3-46a7-9806-7027294465d8_1665565219.2178264.png)\n\n```\nvar destCity = function(paths) {\n    const hashmapStart = {};\n    const hashmapEnd = {};\n    \n    for (let i = 0; i < paths.length; i++) {\n        hashmapStart[paths[i][0]] = 1;\n        hashmapEnd[paths[i][1]] = 1;\n    }\n    \n    const array = Object.keys(hashmapEnd);\n    for (let i = 0; i < array.length; i++) {\n        if (!hashmapStart[array[i]]) return array[i];\n    }\n};\n```
['JavaScript']