摘要:
Maximum Product of Word Lengths class Solution(object): def maxProduct(self, words): """ :type words: List[str] :rtype: int """ es = [] for w in words 阅读全文
摘要:
Bulls and Cows 要点:类似于Word Pattern,guess和secret要存成两个counts,因为guess中了的可能在secret之前出现,vice versa。另一种方法是可以多遍统计:先过一遍secret,然后过一遍guess统计cows,最后统计bulls调整cows 阅读全文