最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

leetcode771. Jewels and Stones

2022-03-01 13:25 作者:您是打尖兒還是住店呢  | 我要投稿

You're given strings?jewels?representing the types of stones that are jewels, and?stones?representing the stones you have. Each character in?stones?is a type of stone you have. You want to know how many of the stones you have are also jewels.

Letters are case sensitive, so?"a"?is considered a different type of stone from?"A".

?

Example 1:

Input: jewels = "aA", stones = "aAAbbbb"Output: 3

Example 2:

Input: jewels = "z", stones = "ZZ"Output: 0

?

Constraints:

  • 1 <=?jewels.length, stones.length <= 50

  • jewels?and?stones?consist of only English letters.

  • All the characters of?jewels?are?unique.




Runtime:?3 ms, faster than?32.45%?of?Java?online submissions for?Jewels and Stones.

Memory Usage:?42.7 MB, less than?15.42%?of?Java?online submissions for?Jewels and Stones.


leetcode771. Jewels and Stones的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
南川市| 玉山县| 嘉兴市| 马关县| 汝阳县| 盐源县| 凤山县| 顺平县| 安化县| 大宁县| 万全县| 阜新| 渭南市| 大理市| 江油市| 五台县| 手机| 宜宾市| 桓台县| 海伦市| 若羌县| 博罗县| 合江县| 渭源县| 揭西县| 康马县| 平原县| 安福县| 麻阳| 黄梅县| 芜湖市| 任丘市| 辽中县| 罗定市| 光山县| 称多县| 汽车| 孝感市| 琼中| 新丰县| 麻江县|