LeetCode Entry
1436. Destination City
#### Join me on Telegram
1436. Destination City easy
blog post
substack

Join me on Telegram
https://t.me/leetcode_daily_unstoppable/439
Complexity
-
Time complexity: \(O(n)\)
-
Space complexity: \(O(n)\), with
toSet
Code
fun destCity(paths: List<List<String>>): String =
(paths.map { it[1] } - paths.map { it[0] }).first()