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

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.