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