Clear Python code

  • 0
    class Solution(object):
    def maxProduct(self, words):
        :type words: List[str]
        :rtype: int
        for i in xrange(len(faker)):
            faker[i]=reduce(lambda x,y:x|y,[1<<(ord(w)-97) for w in words[i]],0)#use bit to distinct diff char
        for i in xrange(len(faker)-1):
            for j in xrange(i+1,len(faker)):
                if faker[i]&faker[j]==0:
        return res

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.