Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
753 views
in Online Assessments by Expert (34,270 points) | 753 views

1 Answer

0 like 0 dislike
Find the password strength.
For each substring of the password which contains at least one vowel and one consonant, its strength goes up by 1.
vowels={'a', 'e', 'i', 'o', 'u'}, and rest of letters are all consonant.
(Only lower alphabet letters)

Input:
thisisbeautiful

output:
6

explaination:
this, is, be, aut, if, ul
input:
hackerrank

output:
3

explaination:
hack, er, rank
input:
aeiou

output:
0
by Expert (34,270 points)