Java Complex But Understandable Solution
\nclass Solution {\n  public int maxLength(List<String> arr) {\n        List<Integer> result = new ArrayList<>();\n    result.add(0);\n    int res = 0;\n    for
```\nclass Solution {\n  public int maxLength(List<String> arr) {\n        List<Integer> result = new ArrayList<>();\n    result.add(0);\n    int res = 0;\n    for (String s : arr) {\n      int a = 0, dup = 0;\n      for (char c : s.toCharArray()) {\n        dup |= a & (1 << (c - \'a\'));\n        a |= 1 << (c - \'a\');\n      }\n      if (dup > 0)    continue;\n      for (int i = result.size() - 1; i >= 0; i--) {\n        if ((result.get(i) & a) > 0) continue;\n        result.add(result.get(i) | a);\n        res = Math.max(res, Integer.bitCount(result.get(i) | a));\n      }\n    }\n    return res;\n  }\n}\n```
['Java']