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.

12345678910111213141516171819
  1. You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.
  2. The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".
  3. Example 1:
  4. Input: J = "aA", S = "aAAbbbb"
  5. Output: 3
  6. Example 2:
  7. Input: J = "z", S = "ZZ"
  8. Output: 0
  9. Note:
  10. S and J will consist of letters and have length at most 50.
  11. The characters in J are distinct.