Skip to content

Instantly share code, notes, and snippets.

View dilanshah's full-sized avatar

Dilan Shah dilanshah

View GitHub Profile
@dilanshah
dilanshah / jewelsandstones.py
Last active February 24, 2018 23:49
Problem 771. Jewels and Stones on Leetcode
# 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):