yesiamrajeev / Hacktoberfest2024

Do contribute to this repository and gain experience. Happy-Hacking.
16 stars 65 forks source link

A strong password checker #90

Closed fus0g closed 1 day ago

fus0g commented 1 day ago

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

It has at least 6 characters and at most 20 characters.
It contains at least one lowercase letter, at least one uppercase letter, and at least one digit.
It does not contain three repeating characters in a row (i.e., "Baaabb0" is weak, but "Baaba0" is strong).

Given a string password, return the minimum number of steps required to make password strong. if password is already strong, return 0.

In one step, you can:

Insert one character to password,
Delete one character from password, or
Replace one character of password with another character.
yesiamrajeev commented 1 day ago

code looks great!! good job!!