791. Custom Sort String——string

題目分析:S中先出現的T中先出現 class Solution(object): def repeatedNTimes(self, S, T): count = collections.Counter(T) answer = "" for s in S: answer += s*count[s]
相關文章
相關標籤/搜索