Google Interview Question for SDE-2s
- 0of 0 votes
There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k-1.- shivamdurani220 October 09, 2018 in United States
You can keep inputting the password, the password will automatically be matched against the last n digits entered.
For example, assuming the password is "345", I can open it when I type "012345", but I enter a total of 6 digits.
Please return any string of minimum length that is guaranteed to open the box after the entire string is inputted.
| Report Duplicate | Flag | PURGE
Interview Type: In-Person
Open Chat in New Window