MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / Solution

Class Solution

LeetCode_problems/Jewels and Stones/solution.py:1–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Solution:
2 def numJewelsInStones(self, J: str, S: str) -> int:
3 # maintain count of jewels
4 jewels = 0
5
6 # check how many jewels are in the string of stones
7 for j in J:
8 jewels += S.count(j)
9
10 return jewels

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected