Posted on October 2, 2020October 2, 2020 Description Submission class Solution { public: int numJewelsInStones(string J, string S) { map<char, int> m; for(char ch: J) { m[ch]++; } int ret = 0; for(char ch: S) { if(m.find(ch) != m.end()) { ret++; } } return ret; } }; By Bill0412 Easy LeetCode