五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

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

Leetcode 2299. Strong Password Checker II

2023-02-15 15:09 作者:您是打尖兒還是住店呢  | 我要投稿

A password is said to be?strong?if it satisfies all the following criteria:

  • It has at least?8?characters.

  • It contains at least?one lowercase?letter.

  • It contains at least?one uppercase?letter.

  • It contains at least?one digit.

  • It contains at least?one special character. The special characters are the characters in the following string:?"!@#$%^&*()-+".

  • It does?not?contain?2?of the same character in adjacent positions (i.e.,?"aab"?violates this condition, but?"aba"?does not).

Given a string?password, return?true?if it is a?strong?password. Otherwise, return?false.

?

Example 1:

Input: password = "IloveLe3tcode!"Output: trueExplanation: The password meets all the requirements. Therefore, we return true.

Example 2:

Input: password = "Me+You--IsMyDream"Output: falseExplanation: The password does not contain a digit and also contains 2 of the same character in adjacent positions. Therefore, we return false.

Example 3:

Input: password = "1aB!"Output: falseExplanation: The password does not meet the length requirement. Therefore, we return false.

?

Constraints:

  • 1 <= password.length <= 100

  • password?consists of letters, digits, and special characters:?"!@#$%^&*()-+".

針對(duì)于每個(gè)限制條件寫一個(gè)方法,最終合并;

Runtime:?1 ms, faster than?81.19%?of?Java?online submissions for?Strong Password Checker II.

Memory Usage:?40.3 MB, less than?73.13%?of?Java?online submissions for?Strong Password Checker II.


Leetcode 2299. Strong Password Checker II的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
巍山| 嘉兴市| 全南县| 平湖市| 曲麻莱县| 资中县| 井陉县| 蒲城县| 印江| 浠水县| 安福县| 普格县| 五华县| 吴堡县| 莆田市| 寻甸| 克东县| 仲巴县| 当涂县| 独山县| 友谊县| 革吉县| 密山市| 镇江市| 锦屏县| 安泽县| 天柱县| 自贡市| 高清| 胶南市| 牟定县| 博野县| 古田县| 旺苍县| 拜城县| 汉川市| 沾益县| 定日县| 泽库县| 汶上县| 南漳县|