Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@

**Caitlin Genna** --> "CS Computer Science Graduate, Fordham University." --> [caitlingenna](https://github.com/caitlingenna)

**Simone Corbo** --> "Physics student from Italy, Sapienza University" --> [simonecorbo99](https:://github.com/simonecorbo99)

17 changes: 17 additions & 0 deletions Python3/Solution#771.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#-------Problem Description-------
#
# 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.
#
# 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".
#
#

class Solution:
def numJewelsInStones(self, J: str, S: str) -> int:
c = 0
for s in S:
if s in J:
c = c+1

return c