说是题目可以用不同的语言,但是貌似 Java 是多线程的,用 Java 写肯定容易不少。 但,觉得这个题目用多线程简直是有点脱了裤子放屁。 完整题目内容 题目的网站内容如下: Please complete the following challenge in one of the following programming languages: C, C++, C#, Java, Python, Go, or Typescript. Please only use standard or ubiquitous libraries. If you heavily rely on a library, please include a description on how that library call works with as much detail as possible. Busy Body Bank services many in-person customers every day in their large luxurious lobby at the center of a city. They have N Tellers in stalls at any time to accommodate heavy traffic while optimizing for employee hours whenever possible. N changes from day-to-day as the bank’s management anticipates surges or reductions of Customer count. When the bank is empty, tellers are asleep. When a Customer enters, they announce themselves and a teller wakes up and conducts a transaction that takes some amount of time. As more customers arrive, they wake Tellers and conduct a transaction or wait in the bank’s queue for a teller to become available (if there are none immediately available). The bank’s queue line has M possible positions where Customers can wait for tellers to become available. If a Customer walks into the bank to find no available tellers and a full queue, they will take their business to Small and Simple, a bank across the street. If the bank gets more customers than it expects on any day, then it will call more Tellers in to accommodate this surge, but calling Tellers on-demand usually costs the bank more money than the lost business from under-staffing. The bank…