🎉🔥Java | Simple and Intuitive | 2 ArrayLists | 99% Runtime🔥🎉
Approach\nWe create two separate ArrayLists: One for all the cityA_i and one for all the cityB_i. Note that a destination city will only show up in the list of 
# Approach\nWe create two separate ArrayLists: One for all the `cityA_i` and one for all the `cityB_i`. Note that a destination city will only show up in the list of `cityB_i` but not the list of `cityA_i`, since it should not have a path outgoing to another city. So, we search for elements that are present in the `cityB_i` list and not in the `cityA_i` list.\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\n```\nclass Solution {\n    public String destCity(List<List<String>> paths) {\n        List<String> a = new ArrayList<>();\n        List<String> b = new ArrayList<>();\n        for (int i = 0; i < paths.size(); i++) {\n            a.add(paths.get(i).get(0));\n            b.add(paths.get(i).get(1));\n        }\n        for (int i = 0; i < b.size(); i++) {\n            if (!a.contains(b.get(i))) {\n                return b.get(i);\n            }\n        }\n        return "";\n    }\n}\n```
['Java']