Interview Question for SDE-3s
- 0of 0 votes
Assume you have a function isAccountHacked(String username) This function is called by a system whenever a there is a failed login by a particular username.- sathipkr February 18, 2016 in United States
The function returns true if there have been "n" consecutive unsuccessful login attempts in the last 1hr/36,000 seconds.How will you write this method.I was asked this question in an interview and I came up with few solutions of logging last n timestamps in 1 hr.
He wanted a solution with space complexity of timestamps less than O(n).Let me know if you need any more details
| Report Duplicate | Flag | PURGE
Open Chat in New Window