You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def gemstones(arr): gems = 0 rocks = len(arr) minerals = set(list("".join(arr))) arr = [list(rock) for rock in arr] for mineral in minerals: if len([True for rock in arr if mineral in rock]) == rocks: gems += 1 return gems
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!