[LeetCode] Strong Password Checker 密码强度检查器

Posted Grandyang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[LeetCode] Strong Password Checker 密码强度检查器相关的知识,希望对你有一定的参考价值。

 

A password is considered strong if below conditions are all met:

  1. It has at least 6 characters and at most 20 characters.
  2. It must contain at least one lowercase letter, at least one uppercase letter, and at least one digit.
  3. It must NOT contain three repeating characters in a row ("...aaa..." is weak, but "...aa...a..." is strong, assuming other conditions are met).

Write a function strongPasswordChecker(s), that takes a string s as input, and return the MINIMUM change required to make s a strong password. If s is already strong, return 0.

Insertion, deletion or replace of any one character are all considered as one change.

 

s

 

以上是关于[LeetCode] Strong Password Checker 密码强度检查器的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode(数据库)- Strong Friendship

好strong-password-checker,我自己做出来的:)

420. Strong Password Checker

#Leetcode# 228. Summary Ranges

LeetCode笔记:Biweekly Contest 80

LeetCode 2299. 强密码检验器 II