Originally posted by: Kenji4861
well this was an interview question and as you all said, I feel that they both have a reason for their existance.
But there must be some kind of answer to this. I just wanted to hear what everyone had in mind.
Shens... to try to make up for frivolous post... but
If this is true, than you explain LIFO and FIFO and that it depends on the use, then say you can use a deque or doubled end queue.
But as for theory Queue is more used in hardware/software OS, I believe, because FIFO is the best suited for most scheduling for threads and processes. Stacks are sometimes used for priority scheduling, but otherwise queues are used for anything that requires real-time processes. For regular calculations, it is about equal.