# https://leetcode.com/problems/ransom-note

from collections import Counter


class Solution:
    def canConstruct(self, ransomNote: str, magazine: str) -> bool:
        r_cnt = Counter(ransomNote)
        m_cnt = Counter(magazine)
        for key in r_cnt:
            if r_cnt[key] > m_cnt[key]:
                return False
        return True

4478df320db5841fc9e4a6348d25c9bcfd755df2
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def canConstruct(self, ransomNote: str, magazine: str) ->bool:
        r_cnt = Counter(ransomNote)
        m_cnt = Counter(magazine)
        for key in r_cnt:
            if r_cnt[key] > m_cnt[key]:
                return False
        return True

from collections import Counter


class Solution:

    def canConstruct(self, ransomNote: str, magazine: str) ->bool:
        r_cnt = Counter(ransomNote)
        m_cnt = Counter(magazine)
        for key in r_cnt:
            if r_cnt[key] > m_cnt[key]:
                return False
        return True

# https://leetcode.com/problems/ransom-note

from collections import Counter


class Solution:
    def canConstruct(self, ransomNote: str, magazine: str) -> bool:
        r_cnt = Counter(ransomNote)
        m_cnt = Counter(magazine)
        for key in r_cnt:
            if r_cnt[key] > m_cnt[key]:
                return False
        return True
