国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

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

LeetCode 2185. Counting Words With a Given Prefix

2023-01-28 16:55 作者:您是打尖兒還是住店呢  | 我要投稿

You are given an array of strings?words?and a string?pref.

Return?the number of strings in?words?that contain?pref?as a?prefix.

A?prefix?of a string?s?is any leading contiguous substring of?s.

?

Example 1:

Input: words = ["pay","attention","practice","attend"], pref = "at"Output: 2Explanation: The 2 strings that contain "at" as a prefix are: "attention" and "attend".

Example 2:

Input: words = ["leetcode","win","loops","success"], pref = "code"Output: 0Explanation: There are no strings that contain "code" as a prefix.

?

Constraints:

  • 1 <= words.length <= 100

  • 1 <= words[i].length, pref.length <= 100

  • words[i]?and?pref?consist of lowercase English letters.

Accepted

55,505

Submissions

71,829


基本屬于同樣的題,結(jié)果出了2次。。。

Runtime:?1 ms, faster than?65.97%?of?Java?online submissions for?Counting Words With a Given Prefix.

Memory Usage:?42 MB, less than?87.49%?of?Java?online submissions for?Counting Words With a Given Prefix.


LeetCode 2185. Counting Words With a Given Prefix的評論 (共 條)

分享到微博請遵守國家法律
凌云县| 秭归县| 铜鼓县| 麻阳| 资中县| 铁岭县| 西充县| 裕民县| 萝北县| 弋阳县| 榆林市| 宁蒗| 安溪县| 靖州| 焦作市| 桃江县| 怀安县| 东丽区| 和林格尔县| 鹤壁市| 长寿区| 大悟县| 从江县| 民县| 修水县| 广丰县| 丰都县| 会东县| 松溪县| 台中县| 宝坻区| 基隆市| 达孜县| 四川省| 辰溪县| 丹东市| 台东市| 合水县| 安乡县| 南岸区| 沛县|