Skip to content

Instantly share code, notes, and snippets.

View luchiago's full-sized avatar
🚀
Learning

Lucas Hiago luchiago

🚀
Learning
View GitHub Profile
# @param {String} j
# @param {String} s
# @return {Integer}
def num_jewels_in_stones(j, s)
jewels = j.split("")
total = 0
s.split("").each do |stone|
total += 1 if jewels.include?(stone)
end