✅☑ Beats 97% User || RECURSIVE SOLUTION
Time Complexity: O(2^N * N)\n# Space Complexity: O(M + N)\n\n# Code\n\nclass Solution {\npublic:\n    int rec_helper(int ind , string& res , vector<string>& arr
# Time Complexity: O(2^N * N)\n# Space Complexity: O(M + N)\n\n# Code\n```\nclass Solution {\npublic:\n    int rec_helper(int ind , string& res , vector<string>& arr){\n        \n        int curr_bit = 0;\n        for(auto& ch : res){\n            int maskBit = (1 << (ch - \'a\'));\n            if(curr_bit & maskBit) return 0;\n            curr_bit += maskBit;\n        }\n        \n        if(ind == arr.size()) return res.size();\n        int non_take = rec_helper(ind + 1, res , arr);\n        int take = INT_MIN;\n        for(auto& c : arr[ind]) res.push_back(c);\n        take = rec_helper(ind + 1 , res , arr);\n        for(auto& c : arr[ind]) res.pop_back();\n        return max(take , non_take);\n    }\n    int rec(vector<string>& arr){\n        string s = "";\n        return rec_helper(0 , s , arr);\n    }\n    int maxLength(vector<string>& arr) {\n        return rec(arr);\n    }\n\n};\n```
['Dynamic Programming', 'Bit Manipulation', 'Recursion', 'C++']