You are viewing a single comment's thread. Return to all comments →
Python, using reduce
import reduce from functools def gemstones(arr): sarr = list(map(set, arr)) return len(reduce(lambda c, f: c.intersection(f), sarr))
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 →
Python, using reduce