Talk:Queue (data structure)

From Wikipedia, the free encyclopedia

"Bus" network topology This article is part of WikiProject Computer networking, an attempt to build a comprehensive and detailed guide to Computer networking on Wikipedia. If you would like to participate, you can edit the article attached to this page, or visit the project page, where you can join the project and/or contribute to the discussion.
B This article has been rated as B-Class on the assessment scale.
Mid This article is on a subject of mid priority within Computer networking for inclusion in Wikipedia 1.0.

This article is within the scope of WikiProject Computer science, which aims to create a comprehensive computer science reference for Wikipedia. Visit the project page for more information and to join in on related discussions.
Start rated as start-Class on the assessment scale
Top rated as Top-importance on the assessment scale

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)