a really easy Java DFS solution.
First step: build a function to check a string if is a unique string-----> isUnique();\nSecond step:think the backtrack step, can it be optimized by memo array/
First step: build a function to check a string if is a unique string-----> isUnique();\nSecond step:think the backtrack step, **can it be optimized by memo array/map ? my answer is no.** Because this is a top-bottom way, which means we have to detect the answer one by one, and the previous temporary answers are not exactly useful for the next ones in later computation.\n\nFor example:\n[un,iq,ue]: un\'s answer is 2, and we can simply compute it by un.length(), there does not need a map or array to memo it...\n\nIf you want to use memo, I guess you may need to compute it bottom-up, which likes DP answer...\n\nStep 3: to write the dfs and backtrack procedures:\n1.when index is equal to the length, then return.\n2.After that, we check the current string cur and adding the next one to it, one by one, which is str, then continue to dfs it.\n3. we get the maximum result ,and return it.\n\n\n```\nclass Solution {    \n    public int maxLength(List<String> arr) {\n        return helper(arr,0,"");\n    }\n    \n    private int helper(List<String> arr,int index,String cur){        \n        if(index==arr.size()){\n            return cur.length();\n        }     \n        \n        int res=cur.length();\n        for(int i=index;i<arr.size();i++){\n            String str=cur+arr.get(i);           \n            if(isUnique(str)){\n                res=Math.max(res,helper(arr,i+1,str)); \n            }\n            \n        }\n        return res;\n    }\n    \n    private boolean isUnique(String s){\n        Set<Character> set=new HashSet<>();\n        for(char c:s.toCharArray()){\n            if(!set.add(c)){\n                return false;\n            }\n        }\n        return true;\n    }\n}\n```
[]