Recursion|| Set
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nimport java.util.*;\n\npublic class Solution {\n    public int maxLength(List<String> arr) {\n        return backtrack(arr, 0, "");\n    }\n\n    private int backtrack(List<String> arr, int index, String current) {\n        if (!unique(current)) {\n            return 0;\n        }\n\n        int maxLength = current.length();\n\n        \n        for (int i = index; i < arr.size(); i++) {\n            maxLength = Math.max(maxLength, backtrack(arr, i + 1, current + arr.get(i)));\n        }\n\n        return maxLength;\n    }\n\n    public static boolean unique(String s) {\n        Set<Character> set = new HashSet<>();\n        for (char ch : s.toCharArray()) {\n            if (!set.add(ch)) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n\n```
['Recursion', 'Ordered Set', 'Java']