GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — leetcode/python/771_Jewels_and_Stones.py at master · qiyuangong/leetcode Expand file tree/ Copy path771_Jewels_and_Stones.pyMore file actions 15 lines (15 loc) · 339 Bytes / Copy path771_Jewels_and_Stones.pyFile metadata and controls15 lines (15 loc) · 339 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class Solution(object): def numJewelsInStones(self, J, S): """ :type J: str :type S: str :rtype: int """ if len(J) == 0 or len(S) == 0: return 0 j_set = set(J) ans = 0 for c in S: if c in j_set: ans += 1 return ans |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |