Bracktrack
\n\n# Code\n\n\n\nclass Solution {\npublic:\n    int maxLength(vector<string>& arr) {\n        int maxLength = 0;\n        backTrack(arr, "", 0, maxLength);\n  
\n\n# Code\n```\n\n\nclass Solution {\npublic:\n    int maxLength(vector<string>& arr) {\n        int maxLength = 0;\n        backTrack(arr, "", 0, maxLength);\n        return maxLength;\n    }\n\nprivate:\n    void backTrack(const vector<string>& arr, string current, int start, int& maxLength) {\n        if (maxLength < current.length())\n            maxLength = current.length();\n\n        for (int i = start; i < arr.size(); i++) {\n            if (!isValid(current, arr[i]))\n                continue;\n\n            backTrack(arr, current + arr[i], i + 1, maxLength);\n        }\n    }\n\n    bool isValid(const string& currentString, const string& newString) {\n        unordered_set<char> charSet;\n\n        for (char ch : newString) {\n            if (charSet.count(ch) > 0) {\n                return false; \n            }\n\n            charSet.insert(ch);\n\n            if (currentString.find(ch) != string::npos) {\n                return false;  \n            }\n        }\n\n        return true;\n    }\n};\n\n\n\n\n\n```
['C++']