Amazon SDE 2 Interview Experience
I got asked a couple of questions for SDE2 onsite -
1> There is a Dog Care System, where entry is allowed based on certain parameters, for eg - dog's age, list of vaccines dog already has already been vaccinated with etc. There could be more entry rules added in the future.
There is a method - canBeAllowedEntry(Dog dog) {
}
Complete the method, writing a maintainable, extensible and scalable code. Any ideas on the solution?
2> On dropbox, files from local and remote get synced. Write a method to sync the files from local and remote folders. eg of a folder - /c/abg/pw
A folder can have a multiple files.
public void sync(Local local, Remote remote) {
}
Complete the above function. Basically, you have to find diff between local and remote to check what changed. How do you come up with data structure to represent the files and folders and how do you find diff between local and remote. Solution for this?


