五月天青色头像情侣网名,国产亚洲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ó)家法律
平安县| 木兰县| 清流县| 遵义县| 镇江市| 南涧| 正蓝旗| 桃园市| 怀宁县| 永昌县| 湘潭市| 白河县| 老河口市| 肃宁县| 昌邑市| 温泉县| 固阳县| 乌拉特中旗| 梨树县| 社旗县| 故城县| 郸城县| 子洲县| 达拉特旗| 汝城县| 山东| 黔江区| 德昌县| 庄浪县| 隆子县| 武乡县| 岳阳市| 普安县| 淅川县| 理塘县| 平江县| 西峡县| 蒙自县| 铁力市| 龙口市| 淅川县|