My LeetCode grinding. Trying to do a problem a day.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

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