hardGreedyHeap Priority QueueString 0 views

Strong Password Checker

A password is considered strong if the below conditions are all met: Given a string password, return the minimum number of steps required to make password strong.

A password is considered strong if the below conditions are all met:

Given a string password, return the minimum number of steps required to make password strong. if password is already strong, return 0.

In one step, you can:

Strong Password Checker diagram

Example 1

Input: password = "a"

Output: 5

Example 2

Input: password = "aA1"

Output: 3

Example 3

Input: password = "1337C0d3"

Output: 0

Constraints

  • 1 <= password.length <= 50
  • password consists of letters, digits, dot '.' or exclamation mark '!'.

Hints

No hints yet.

Companies

No companies reported yet.

Discussion

Sign in to join the discussion.

Loading discussion...

Test results

No test cases yet.