{"title":" String Subset","blog_url":"https://podhmo.hatenadiary.org/","author_url":"https://blog.hatena.ne.jp/podhmo/","url":"https://podhmo.hatenadiary.org/entry/20101206/1291639427","blog_title":"podhmo\u306e\u65e5\u8a18","description":"http://programmingpraxis.com/2010/11/23/string-subsets/ import operator import collections def is_str_subset(sub, base): D = collections.defaultdict(lambda : 0) for c in list(base): D[c] += 1 for c in list(sub): D[c] -= 1 if D[c] < 0: return False return True if __name__ == '__main__': str1 = \"DA\" s\u2026","author_name":"podhmo","type":"rich","height":"190","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpodhmo.hatenadiary.org%2Fentry%2F20101206%2F1291639427\" title=\" String Subset - podhmo\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","image_url":null,"categories":["python","scheme","programing praxis"],"width":"100%","version":"1.0","published":"2010-12-06 21:43:47"}