In a barber shop there are 2 doors. customer come in 1 door, leave in other. minimum # of chairs. barber spend his life in cutting. always barber can cut 1 customer. few chairs in the shop. if barber busy customer waits, if chairs full, customer leave. if no customer, barber sleeps. treat barber and customer as 2 threads. you can use Semaphore class with arrive and depart and count as parameter.
2115Post New NCR Java Related AllOther Interview Questions
What is the difference between sap bw 3.5 and 7.0?
What is the use of recordreader in hadoop?
What are c++ data types?
What is difference between rb tree and avl tree?
to write a back ground functionality in an activity, should I use a thread or service?
what is the use of steel rods of 16mm or 20mm used for 4.45mts for closing gutter.one mate consumes how many kgs with a gap of 6inches.
Explain JSON Objects?
What is the __ init __ method used for?
What is throughput? How does HDFS provide good throughput?
What is case class? What is case object? What are the Advantages of case class?
What is the use of pycharm?
What is jpql in hibernate?
If offered the job, how long do you plan to stay at Ross Stores?
What is asp.net globalization?
what is function of retain statment