LeetCode: 1436-Destination City Solution
Last Updated on 2023-12-15 by Clay
Problem
You are given the array paths
, where paths[i] = [cityAi, cityBi]
means there exists a direct path going from cityAi
to cityBi
. Return the destination city, that is, the city without any path outgoing to another city.