- Producer Consumer Problem:
Scenario 1: Traditional Problem
Scenario 2: Producer should produce and puts in the shared buffer. Every consumer should consume the item before we delete it from the shared buffer.
- In race court, there are 5 tracks and 25 horses to race. We need to find the top 3 from the 25 horses. Assumption is - Horses perform in the same way during all the races and we can't record the times. You can make horses to participate any number of times. In how many races, you can find the top 3?
Subscribe to:
Post Comments (Atom)
6 comments:
What happened ?
8 races for top 3..
7 races for top 3
@Sankar: What "What happened?" :)
Everything is fine..
@Sankar:
One junk fellow asked me these questions and I thought I will share them..
@Vishnu Solution for scenario 2, you have?
>> @Sankar: What "What happened?" :)
Looked like an interview question ;-)
Post a Comment