1436. Destination City Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 1436class Solution: def destCity(self, paths: List[List[str]]) -> str: s = {a for a, _ in paths} return next(b for _, b in paths if b not in s)