JAVA SOLUTION 81% FASTER
One of Microsoft\'s most asked question\n\nUpvote if u like the post\n\n\n// create a list to store all the combination of word formed by concatenation, also in
**One of Microsoft\'s most asked question**\n\n**Upvote if u like the post**\n```\n\n// create a list to store all the combination of word formed by concatenation, also include the string of arr\n\n// Before adding a string in the list check if the string has unique characters or not \n\n// Keep track of the maxLength concatenated string added in the list\n\nclass Solution {\n    \n    // check duplicacy\n    \n    private boolean checkUnique(String x)\n    {\n        int[] fq=new int[26];\n        \n        for(char c:x.toCharArray())\n        {\n            if(++fq[c-\'a\']>1)\n                return false;\n        }\n        return true;\n    }\n    \n    public int maxLength(List<String> arr) \n    {\n        List<String> list=new ArrayList<>();\n        int ans=0;\n        for(String str:arr)\n        {\n            List<String> tmp=new ArrayList<>();\n            if(!checkUnique(str))\n                continue;\n            tmp.add(str); // store all combination of strings formed\n            ans=Math.max(ans,str.length());\n            for(String s:list)\n            {\n                String cur=s+str;  // combination\n                if(checkUnique(cur))\n                {\n                    tmp.add(cur);\n                    ans=Math.max(ans,cur.length());\n                }\n            }\n            list.addAll(tmp);  // Main list  \n        }\n        return ans;\n    }\n}\n```
['Array', 'Java']