Amazon Online Assessment 2021 (OA) - Find Password Strength
The folks who design security strategies for online platforms have created a fresh way to gauge how strong a username is. This method works only on usernames that use lower case English alphabets. To get the strength of a username, they tally up the different kinds of alphabets used in all potential chains of characters that can be made from that username.
Here's a thing to remember: any chain of characters we take from a username has to be in the same order as in the username. Given a username, you have to find out how strong it is based on these rules.
Relevant Amazon OA Problems:
password = good
16

Thus, password strength = 1 + 1 + 1 + 1 + 2 + 1 + 2 + 2 + 3 = 16.
password = test
19
password = abc
10