We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
there are so many test cases and it seems working but most of them are failing because of time limit.
`python
for x in passwords:
if x == loginAttempt[:len(x)]:
# print(x)
if x == loginAttempt:
return x
res = passwordCracker(passwords, loginAttempt[len(x):])
if res != 0 and 'WRONG PASSWORD' not in res:
return x +' '+ res
else:
continue
return 'WRONG PASSWORD'`
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Password Cracker
You are viewing a single comment's thread. Return to all comments →
there are so many test cases and it seems working but most of them are failing because of time limit.
`python
for x in passwords: if x == loginAttempt[:len(x)]: # print(x) if x == loginAttempt: return x res = passwordCracker(passwords, loginAttempt[len(x):]) if res != 0 and 'WRONG PASSWORD' not in res: return x +' '+ res else: continue return 'WRONG PASSWORD'`