My LeetCode grinding. Trying to do a problem a day.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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