Description
A strong password has 6-20 chars, at least one lowercase, uppercase, and digit, no 3 consecutive repeating chars. Return minimum steps to make password strong.
Examples
Input:
password = "a"Output:
5Explanation:
Add 5 characters.
Input:
password = "1337C0d3"Output:
0Explanation:
Edge case returning zero.
Input:
password = "aaaaaaaaaaaaaaaaaaaaa"Output:
7Explanation:
The password exceeds maximum length, lacks uppercase and digit, and has repeating sequences. Multiple operations are needed.
Constraints
- •
1 ≤ password.length ≤ 50