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.
1683Post New NCR Java Related AllOther Interview Questions
A signal has a wavelength of 1 micro min in air.how far can the front of the wave travel during 1000periods?
In k-means or knn, we use euclidean distance to calculate the distance between nearest neighbors. Why not manhattan distance?
What is @@rowcount in sql?
what are the standard IR values should be of R-E, Y-E, B-E, R-Y, Y-B, B-R of VCB in closed condition and in open condition for 500KVA & 1000KVA transformers. and what is the acceptable range when tested by 5000V megger.
How to sort an array from smallest to largest java?
Why css is faster than xpath?
Who maintains the CSS specifications?
Give us a example of automatic recording with basic and desktop versions?
What is directory submission?
What is sqlca in powerbuilder?
What is app pool and app domain? What is the difference between the two in iis?
What is a buffer c++?
What is ejb in weblogic?
Explain the significance of the & and && operators in pl sql.
What is events in backbone.js?