Stefan | ᕕ(◠ڼ◠)ᕗ says to 電訊台
string destCity(vector<vector<string>>& paths) { unordered_map<string, string> adj; for (auto &x : paths) adj[x[0]] = x[1]; auto &x = adj.begin()->second; while (adj.find(x) != adj.end()) x = adj[x]; return x; } end