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

歡迎光臨散文網(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ó)家法律
岫岩| 华亭县| 灵宝市| 岳阳市| 汤阴县| 沂源县| 岗巴县| 佳木斯市| 通辽市| 沈丘县| 瓦房店市| 阿合奇县| 远安县| 上杭县| 土默特左旗| 招远市| 阿尔山市| 台北市| 沈丘县| 贡觉县| 南城县| 台北县| 清河县| 五指山市| 昌平区| 常德市| 巴里| 台中县| 平邑县| 安塞县| 克什克腾旗| 丰城市| 嘉黎县| 扎鲁特旗| 轮台县| 兰西县| 洞口县| 贵州省| 综艺| 浮山县| 阿拉善左旗|