Description
A password is strong if: length >= 8, contains lowercase, uppercase, digit, special character, and no two adjacent characters are the same. Return true or false.
Examples
Input:
password = "IloveLe3tcode!"Output:
trueExplanation:
The password meets every requirement: it is at least 8 characters long, includes lowercase, uppercase, a digit, and a special character, and has no adjacent duplicates. The exact output is true.
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