0

last week I've done a phone interview and got stuck on one question:

Bank 1 has 5 tellers, each serving one customer at a time independently; Bank 2 has 5 tellers, sharing a queue of customers to serve. Which bank you prefer? Why?

I don't know what the interviewer want to know through this question. What I can do is just say, Bank 2 is better since most banks only have one queue and one queue can ensure no one will wait too long if one teller got stuck.

But I find the interviewer seems not satisfied.

Anyone knows the best answer for this question?

Leonard
  • 139
  • 1
  • 11

2 Answers2

1

Your answer is not considering the real question the interviewer is asking - "How do you think about this type of problem?". Your answer given is "other people do it this way, so do it that way." That is a cop-out, which is why it was unsatisfactory. Instead, consider that they are comparing single-threading and multi-threading as operations. Discuss the advantages and disadvantages of each. Discuss the reasons why you would prefer one over the other based upon technical concerns. You only addressed one edge case - one teller gets "stuck". What about optimizing wait times, considering types of tasks performed at each station, etc?

Interviewers care about how you think, not about the answer you give.

0

With bank 1 you have 5 tellers and 5 lines, one for each teller. That means if 5 people got in line for the first teller, they would need to wait and be processed one at a time by that teller, all the while the other 4 tellers are doing nothing. With bank2 you have 5 tellers and 1 line. if 5 people all get in line they would be dispersed to the five tellers and all be helped at the same time. So bank 2 is more efficient in design.

Jay Hamilton
  • 114
  • 5