My LeetCode grinding. Trying to do a problem a day.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011
  1. Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false.
  2. Each letter in the magazine string can only be used once in your ransom note.
  3. Note:
  4. You may assume that both strings contain only lowercase letters.
  5. canConstruct("a", "b") -> false
  6. canConstruct("aa", "ab") -> false
  7. canConstruct("aa", "aab") -> true