看板 Marginalman 關於我們 聯絡資訊
腦袋背AVAM搞得不想思考了 一二三四五 幸好是綠色 def removeAnagrams(self, words: List[str]) -> List[str]: pre = None rets = [] for word in words: ss = ''.join(sorted(word)) if ss == pre: continue else: rets.append(word) pre = ss return rets -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.58.28 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1760368684.A.7E5.html
oin1104: 你好強 10/13 23:32