Thread: About Queues

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    96

    About Queues

    Hi,

    I am making a program of Queues and using its class, I wanted to know that can we implement Queues using the link list?

    Do we have to make a seperate class for link list and for Queues?

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    a linked list can be used as a queue. to make it more queue-like, you may want to wrap it inside another class that only exposes a queue interface.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    Queues can be implemented as a linked list or a circular buffer. Normally queues are first in / first out only, so the main functions are push back (append to end of queue) and pop front (retrieve from front of queue). A generic linked list class includes other types of adding and removing elements from a list.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Please Help with Queues
    By Hikaru90 in forum C Programming
    Replies: 5
    Last Post: 03-14-2010, 08:55 AM
  2. help with queues
    By Raideen in forum C Programming
    Replies: 2
    Last Post: 07-24-2002, 10:56 PM
  3. help with queues
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 05-21-2002, 09:09 PM
  4. help with queues
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 05-21-2002, 11:39 AM
  5. queues
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 10-11-2001, 05:19 PM