Beats 100% in time and 70% in space
Intuition\n Describe your first thoughts on how to solve this problem. \nFirst to store all the elements of city A in set and then traverse through city B, and 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nFirst to store all the elements of city A in set and then traverse through city B, and if it not contains it then that city B is your destination.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUsing HashSet\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n# Code\n```\nclass Solution {\n    public String destCity(List<List<String>> paths) {\n        int l=paths.size();\n        HashSet<String> set=new HashSet<>();\n        for(int i=0;i<l;i++)\n        {\n            set.add(paths.get(i).get(0));\n        }\n        for(int i=0;i<l;i++)\n        {\n            if(!set.contains(paths.get(i).get(1)))\n            return paths.get(i).get(1);\n        }\n        return "";\n    }\n}\n```
['Java']