CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Queue

  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Queue

    i want to do a program using 2 queues to sort a number of integers but i am not sure where and how to start.i have basic java skills! Help Please!

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Queue

    Why don't you look at priority queue.
    http://java.sun.com/j2se/1.5.0/docs/...rityQueue.html
    http://marknelson.us/1996/01/01/priority-queues/
    http://www.java2s.com/Tutorial/Java/...rityQueues.htm
    A priority queue will sort queue entries. It is implemented as a heap.

    #1 Reheapification upwards: The addition of a queue item, and sort the queue.

    #3 Reheapification downwards: Removal of the highest priority heap item and also sort the queue.

    You will also need to understand binary trees. A heap is a special kind of binary tree where the highest priority items are at the top.

    HTH,
    Last edited by ahoodin; October 3rd, 2008 at 12:49 PM.
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Oct 2008
    Posts
    20

    Queue

    A queue is a particular kind of collection in which the entities in the collection are kept in order and the principal operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. Queues provide services in computer science, transport and operations research where various entities such as data, objects, persons, or events are stored and held to be processed later. In these contexts, the queue performs the function of a buffer.
    _______________________________________
    Mens Carhartt Coats dubai real estate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured