You are viewing a single comment's thread. Return to all comments →
def gemstones(arr): freq = {} gems = 0 for rock in arr: for i, m in enumerate(rock): if i == rock.index(m): freq[m] = freq.get(m, 0) + 1 if freq[m] == len(arr): 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 →