Strong Password Checker II

Easy

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:true
Explanation:

Meets all criteria.

Input:password = "Me+You--IsMyDream"
Output:false
Explanation:

Missing a digit. The password has uppercase, lowercase, and special characters but no numeric digit.

Input:password = "1aB!"
Output:false
Explanation:

Too short. The password has only 4 characters but requires a minimum length of 8.

Constraints

  • 1 ≤ password.length ≤ 100

Ready to solve this problem?

Practice solo or challenge other developers in a real-time coding battle!