#NEWLINE# def maxProduct( self , words ) : #NEWLINE# #INDENT# '\n        Brute force: O(n*n*k)\n        Encode string using bit manipulation\n        :type words: List[str]\n        :rtype: int\n        ' #NEWLINE# l = map ( len , words ) #NEWLINE# codes = map ( self . encode , words ) #NEWLINE# maxa = 0 #NEWLINE# for i in xrange ( len ( codes ) ) : #NEWLINE# #INDENT# for j in xrange ( ( i + 1 ) , len ( codes ) ) : #NEWLINE# #INDENT# if ( ( codes [ i ] & codes [ j ] ) == 0 ) : #NEWLINE# #INDENT# maxa = max ( maxa , ( self [ i ] * l [ j ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return maxa