Python – Explanation – Hash
\nclass Solution:\n    def destCity(self, paths: List[List[str]]) -> str:\n\t\t# Get the source (start), which is the initial point\n        source = paths[0][0
```\nclass Solution:\n    def destCity(self, paths: List[List[str]]) -> str:\n\t\t# Get the source (start), which is the initial point\n        source = paths[0][0]\n        \n\t\t# Create a dictionary to map each source with its destination (source -> destination)\n        graph = {source: destination for source, destination in paths}\n        \n\t\t# Iterate over the graph, if you can not visit any city from you current position, you reached the end\n\t\tcurrent = source\n        while current in graph:\n            current = graph[current]\n        \n\t\t# Return your current position which is the destination\n        return current\n```
['Python']