0
I don't know whats the error is please help me
https://code.sololearn.com/cigzSSTzyOAK/?ref=app the program runs nicely until I give the input Password12#$, the expected output for the given input is 'Strong' but my output is 'Weak' I don't know why please help me
2 Answers
+ 2
Password12#$
012345678901
length is 12
$ is 11
for(int i=0; i < password.length-1; ++i)
11 < 12 - 1
11 < 11 false
last char in pasword is ignored
+ 1
for loop is not iterating complete list.
correct length in both for loops as below.
i<password.length
a<password.length
Note: Try to avoid number of "for loops" to reduce the time complexity of the code.