We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe0f33f commit 98b2bbdCopy full SHA for 98b2bbd
1001-1500/1436.py
@@ -0,0 +1,9 @@
1
+class Solution:
2
+ def destCity(self, paths: List[List[str]]) -> str:
3
+ cities_with_outgoing_path = set()
4
+ for ca,cb in paths:
5
+ cities_with_outgoing_path.add(ca)
6
7
+ if cb not in cities_with_outgoing_path:
8
+ return cb
9
+
0 commit comments