Software Engineer Sr Interview Questions

19,434 software engineer sr interview questions shared by candidates

Your assignment is to implement a Hospital class which admits patients into a hospital. The Hospital class has a single public method, admitOne, which simply prints the name of the patient admitted into the hospital and a timestamp of when he or she was admitted, based on the requirements described below. Requirements ● Implement the admitOne method of the Hospital interface. admitOne should print a log message with a timestamp and the name of the patient when that patient is finally admitted into the Hospital. ● Because there is only one receptionist, you can only admit one patient into the hospital every 5 seconds. For example, if admitOne is called three times (in parallel), it should take ~10 seconds for all three people to be admitted into the hospital. (patient 1 admitted at T-0, patient 2 admitted at T-5, and patient 3 admitted at T-10) ● Admittance to the hospital should be first-come-first-serve. In other words, patients should be admitted in the same order that admitOne was called in. ● Don't worry too much about multi-threading
avatar

Sr. Software Engineer

Interviewed at Intuit

4.2
Mar 1, 2020

Your assignment is to implement a Hospital class which admits patients into a hospital. The Hospital class has a single public method, admitOne, which simply prints the name of the patient admitted into the hospital and a timestamp of when he or she was admitted, based on the requirements described below. Requirements ● Implement the admitOne method of the Hospital interface. admitOne should print a log message with a timestamp and the name of the patient when that patient is finally admitted into the Hospital. ● Because there is only one receptionist, you can only admit one patient into the hospital every 5 seconds. For example, if admitOne is called three times (in parallel), it should take ~10 seconds for all three people to be admitted into the hospital. (patient 1 admitted at T-0, patient 2 admitted at T-5, and patient 3 admitted at T-10) ● Admittance to the hospital should be first-come-first-serve. In other words, patients should be admitted in the same order that admitOne was called in. ● Don't worry too much about multi-threading

Viewing 1211 - 1220 interview questions

Glassdoor has 19,434 interview questions and reports from Software engineer sr interviews. Prepare for your interview. Get hired. Love your job.