leetcode-program

Question 383: Ransom Note

Link

Solution

  1. Store each characters with their counts in a dictionary for Magazine String
  2. Loop through each character in ransomNote. Check the availability of the character in the magazine dictionary
  3. If not then return False, otherwise return True

    Code