Problem
A password is strong if it has at least 8 characters, at least one uppercase letter, at least one lowercase letter and at least one digit (English letters and 0–9).
Implement is_strong_password(password).
Input
password: The password to check (ASCII characters).
Output
Return true if all rules hold, otherwise false.
Constraints
0 ≤ length of password ≤ 100
Examples
Input:
password = "Secret123"
Expected output:
expected = True
Input:
std::string password = "Secret123";
Expected output:
bool expected = true;
Input:
string password = "Secret123";
Expected output:
bool expected = true;
Explanation
9 characters with uppercase S, lowercase letters and digits: strong.
Input:
password = "password1"
Expected output:
expected = False
Input:
std::string password = "password1";
Expected output:
bool expected = false;
Input:
string password = "password1";
Expected output:
bool expected = false;
Explanation
There is no uppercase letter, so it is not strong.
References
This challenge is adapted for CodeUtility. Follow the statement and constraints above.