You are viewing a single comment's thread. Return to all comments →
I did. Here's my solution:
int gemstones(vector <string> arr){ unsigned int charbits = 4294967295; for (string s : arr) { unsigned int temp = 0; for (char c : s) temp |= 1 << (c-'a'); charbits &= temp; } return __builtin_popcount(charbits); }
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 →
I did. Here's my solution: