Java Using HashMap
\npublic String destCity(List<List<String>> paths) {\n        Map<String, Boolean> map = new HashMap<>();\n        for (List<String> ss : paths) {\n            
```\npublic String destCity(List<List<String>> paths) {\n        Map<String, Boolean> map = new HashMap<>();\n        for (List<String> ss : paths) {\n            map.put(ss.get(0), false);\n            if (!map.containsKey(ss.get(1))) {\n                map.put(ss.get(1), true);\n            }\n        }\n        for (String s : map.keySet()) {\n            if (map.get(s)) return s;\n        }\n        return null;\n    }\n```
[]