Tap here to switch tabs
Problem
Submissions

Problem: Strong Password Checker II

med
30 min
Try to solve the Strong Password Checker II problem.

Statement

A password is considered strong if it satisfies all of the following conditions:

  • It has at least 88 characters.

  • It contains at least one lowercase English letter.

  • It contains at least one uppercase English letter.

  • It contains at least one digit.

  • It contains at least one special character from "!@#$%^&*()-+".

  • It does not contain two identical characters in adjacent positions (that is, password[i] != password[i + 1] for all valid indices i).

Given a string password, return true if it is a strong password, or false otherwise.

Constraints:

  • 1≤1 \leq password.length ≤100\leq 100

  • password consists of letters, digits, and special characters: "!@#$%^&*()-+".

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Strong Password Checker II

med
30 min
Try to solve the Strong Password Checker II problem.

Statement

A password is considered strong if it satisfies all of the following conditions:

  • It has at least 88 characters.

  • It contains at least one lowercase English letter.

  • It contains at least one uppercase English letter.

  • It contains at least one digit.

  • It contains at least one special character from "!@#$%^&*()-+".

  • It does not contain two identical characters in adjacent positions (that is, password[i] != password[i + 1] for all valid indices i).

Given a string password, return true if it is a strong password, or false otherwise.

Constraints:

  • 1≤1 \leq password.length ≤100\leq 100

  • password consists of letters, digits, and special characters: "!@#$%^&*()-+".