Re:Sleeping barber problem
by ryanwaggoner on Sunday September 17, 2017 @09:20AM
(#15269467)
I may just be misunderstanding, but if you were to represent a queue of people waiting in line as a data structure, wouldn't they each have a number, like their index in an array, etc? How is that different than a take-a-number system?
Queues are inherently ordered, right? The take-a-number system is still a queue, it just replaces physical ordering with a paper that shows your place in line.
I don't know why I picked such a complicated example.
Did you ever go to the grocery store and had to wait for the people in front of you? That's also queue and yet nobody is taking numbers.