My LeetCode grinding. Trying to do a problem a day.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

problem.txt 484B

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