This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Strings J = types of stones that are jewels | |
# String S = stones you have | |
# Input | |
# J = "aA", S = "aAAbbbb" | |
# Output | |
# 3 | |
# create a dictionary where the key is the char and the value is the number of occurrences | |
def jewels(S, J): |
NewerOlder