Maximum Length of a Concatenated String with Unique Characters

You are given an array of strings. A string can be formed by concatenating a subsequence of the array that contains unique characters. The task is to determine the maximum possible length of such a string.

Constraints

  • 1 <= arr.length <= 16
  • 1 <= arr[i].length <= 26
  • arr[i] contains only lowercase English letters.
Saving… · 2 lines
class Solution:
def maxLengthOfUniqueConcatenatedString(self, arr: List[str]) -> int:
Console

Click Run to execute sample tests.