Problem 53720. Secure Password

You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a password. Your id is an email address you possess. However, the password must be strong. The website considers a password to be strong if it satisfies the following criteria (More criteria might be added later) :
  • Length of the password - atleast 'L' characters.
  • It contains at least 'd' digits. (0-9)
  • It contains at least 'n' lowercase English character. (a-z)
  • It contains at least 'N' uppercase English character. (A-Z)
  • It contains at least 's' special character. The special characters are: <>?!@#$%^&*()-+,.~=/{}[]
  • There should be no repetition of the same character in password - 'aa', '$$', '33', these are not allowed
  • Number of consecutive characters must be less than half of the length of the password (applicable to all except special character)
Example of the last restriction -
P1 = 'abcdODE56789($&'; consecutive characters - 'abcd', 'DE', '56789' = (3+1+4) = 8 instance > 15/2 ==> Invalid
P2 = 'acbdODE67589($&'; consecutive characters - 'DE', '67', '89' = (1+1+1) = 3 instance < 15/2 ==> Valid
Given values, create a Secure password, so that your cody account is safe.
There is no unique output, it will be checked against the criteria mentioned -

Solution Stats

24.39% Correct | 75.61% Incorrect
Last Solution submitted on Jul 03, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers9

Suggested Problems

More from this Author31

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!