hash table
-
[hash] jewels and stonesAlgorithm/LeetCode 2025. 4. 8. 09:52
✅ Problemhttps://leetcode.com/problems/jewels-and-stones/description/ ✅ Approach & Solution방식) HashSet 사용더보기class Solution { public int numJewelsInStones(String jewels, String stones) { int cnt = 0; Set jSet = new HashSet(); for (Character c : jewels.toCharArray()) { jSet.add(c); } for (Character c : stones.toCharArray()) { if (..