Leetcode in Java && Oracle
419 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-11-07_01-01-04.png
27.2 KB
#N771. Jewels and Stones
problem link

#solution
class Solution {
public int numJewelsInStones(String jewels, String stones) {
int count=0;
for(char j:jewels.toCharArray()){
for(char s:stones.toCharArray()){
if(j==s) count++;
}
}

return count;
}
}