C++ 3 Liner fast solution (You'll Love it guaranteed.)
Here my Approach is traverse through the array and store the starting cities in the set.\nand again traverse through the array and find the destination cities i
Here my Approach is traverse through the array and store the starting cities in the set.\nand again traverse through the array and find the destination cities in the set.\nif you find the destination city in the set means the destination city is somewhere starting city.\nthat\'s why condition should be if Not find.\n\n\n```\nstring destCity(vector<vector<string>>& paths) {\n\tunordered_set<string> starting_city;\n\tfor(auto city : paths){starting_city.insert(city[0]);}\n\tfor(auto city : paths){if(starting_city.find(city[1]) == starting_city.end()){return city[1];}}\n\treturn ""; // this is just to avoid error during run time non-void function.\n}\n```\n\n\nIf you have Learned something new please give it upvote;\notherwise thank you for having a look \uD83D\uDE4F\uD83C\uDFFB\n\n
[]