Strong Password Suggester Program
Given a password entered by the user, check its strength and suggest some password if it is not strong.
Criteria for strong password is as follows :
A password is strong if it has :
- At least 8 characters
- At least one special char
- At least one number
- At least one upper and one lower case char.
Input : keshav123 Output : Suggested Password k(eshav12G3 keshav1@A23 kesh!Aav123 ke(shav12V3 keGshav1$23 kesXhav@123 keAshav12$3 kesKhav@123 kes$hav12N3 $kesRhav123 Input :rakesh@1995kumar Output : Your Password is Strong
Approach : Check the input password for its strength if it fulfills all the criteria, then it is strong password else check for the absent characters in it, and return the randomly generated password to the user.
Suggested password geek@201K8 geek@201S8 gOeek@2018 geek@201N8 geek@2P018 geek@D2018 geUek@2018 geek@2Q018 geek@2F018 geekZ@2018
Time complexity : O(n).