Password Strength Validator

Medium
string validation regex
Problem Description

Create a function that validates password strength based on specific criteria: at least 8 characters, contains uppercase, lowercase, digit, and special character (!@#$%^&*).

Input Format
A string representing the password
Output Format
Return "STRONG" if all criteria are met, otherwise return the missing criteria separated by commas
Constraints
1 ≤ password length ≤ 100
Sample Input/Output
Input:
Hello123
Output:
SPECIAL
Explanation

The password has uppercase, lowercase, and digits but missing special characters

Solution Hints
  • Read carefully: Understand input/output format and constraints
  • Start simple: Think of brute force solution first, then optimize
  • Edge cases: Consider empty inputs, single elements, max constraints
  • Data structures: Choose arrays, hash maps, sets based on problem needs
  • Time complexity: Ensure your solution fits within time limits
  • Test examples: Verify logic with provided sample inputs
150
Points
2000ms
Time Limit
256MB
Memory Limit
Code Editor
Register to Submit
Register to Access Code Editor

Create a free account to solve coding problems and track your progress.

Register Now
Feedback