<doocs>0318.Maximum Product of Word Lengths_1.py
def maxProduct( words: List[str]) -> int:
    n = len(words)
    mask = [0] * n
    for i, word in enumerate(words):
        for ch in word:
            mask[i] |= 1 << (ord(ch) - ord('a'))
    ans = 0
    for i in range(n - 1):
        for j in range(i + 1, n):
            if mask[i] & mask[j] == 0:
                ans = max(ans, len(words[i]) * len(words[j]))
    return ans
def sample_funcname ( var_0 : List [ str ] ) -> int :
    var_5 = len ( var_0 )
    var_7 = [ 0 ] * var_5
    for var_9 , var_10 in enumerate ( var_0 ) :
        for var_11 in var_10 :
            var_7 [ var_9 ] |= 1 << ( ord ( var_11 ) - ord ( 'a' ) )
    var_15 = 0
    for var_9 in range ( var_5 - 1 ) :
        for var_17 in range ( var_9 + 1 , var_5 ) :
            if var_7 [ var_9 ] & var_7 [ var_17 ] == 0 :
                var_15 = max ( var_15 , len ( var_0 [ var_9 ] ) * len ( var_0 [ var_17 ] ) )
    return var_15
