771. Jewels and Stones
Question 771
Input: J = "aA", S = "aAAbbbb"
Output: 3Input: J = "z", S = "ZZ"
Output: 0Answer
class Solution:
def numJewelsInStones(self, J, S):
countnum = 0
for stone in S:
if stone in J:
countnum += 1
return countnumLast updated