Talk:Queue (data structure)
From Wikipedia, the free encyclopedia
I would have found a page on circular queues / ring buffers useful. (a queue implemented in an array). Programming in java, there doesn't seem to be a default implementation available, so others might find it useful, esp. with the new java IO model (java.nio.*, java.nio.channel.* etc)
[edit] Scheme advocacy?
How is the Scheme implementation O(1)? If I enqueue a bunch of things, then dequeue them one by one, the first call to dequeue will result in a call to (reverse (queue-back Q)) -- which isn't O(1). It might be amortized O(1), but that's very different for many applications.
I wonder if there isn't some Scheme/Lisp pure-functional style advocacy at play here. Purely functionally, it's not terribly easy to do an efficient queue.
- Yes, the Scheme implementation is only amortized O(1), and frankly the placement creates unnecessary emphasis on it. I'm moving it. Deco 08:32, 31 January 2006 (UTC)
- I will double check if the scheme implementation is popuar than the circular implementation. It smells like an advertisement to me. --Leo 02:17, 12 February 2006 (UTC)
[edit] Article Title vs Subject and content
I am wondering if Queue is the best name for this article. This appears to be much more about a computing article about the Queue (data structure), not one about the overall social concept of a Queue as people waiting to be served, either as a physical waiting line, traffic at an intersection or as a more abstract concept such as is encountered when waiting to be answered by a call centre, jobs being processed in a computer or factory. It perhaps also needs to be explained that a queue is more of an British term, where the social etiquette of a queue is highly developed. -- Cameron Dewe 09:06, 5 October 2006 (UTC)
- I moved the article to Queue (data structure) --Sharcho 02:44, 28 November 2006 (UTC)
[edit] Several cites may be of interest
I just massaged LIFO this afternoon, and there are several quotes in the references which may be of use here if someone wants to mine those. Cheers! // FrankB 00:09, 25 October 2007 (UTC)