Description
A password is strong if: length >= 8, contains lowercase, uppercase, digit, special character, and no two adjacent characters are the same.
Examples
Input:
password = "IloveLe3tcode!"Output:
trueExplanation:
Meets all criteria.
Input:
password = "Me+You--IsMyDream"Output:
falseExplanation:
Missing a digit. The password has uppercase, lowercase, and special characters but no numeric digit.
Input:
password = "1aB!"Output:
falseExplanation:
Too short. The password has only 4 characters but requires a minimum length of 8.
Constraints
- •
1 ≤ password.length ≤ 100