stacks and queues

This is a discussion on stacks and queues within the C Programming forums, part of the General Programming Boards category; I'm having a hard time understanding stacks and queues. I was woundering if anyone could help me out with this ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    45

    stacks and queues

    I'm having a hard time understanding stacks and queues. I was woundering if anyone could help me out with this or show me a good example of them so i could fully understand how I am going to use them in my assignment. Thanks

    -John

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    A stack is like a stack of papers. Whatever you put on last is what you take off first.

    A queue is like a line in the store or bank. Whoever gets in line first, gets done first.

    Search the board for stack or queue and you'll find tons and tons of examples. This is posted daily.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    913

  4. #4
    Registered User
    Join Date
    Jan 2003
    Posts
    45
    alright, thanks

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    102
    FIFO and LIFO.

    First In First out.. kinda like a pipe. YOu put in golfballs from the begenning and then when it gets full the first ball is the first one that is done.

    LIFO. Last in First out. Like how you do your hw .. Just kidding. think of a pipe with one end clogged. How do you get the balls out? By the last one you put in.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 05-04-2009, 08:54 PM
  2. linked lists, stacks and queues
    By aniramg69 in forum C Programming
    Replies: 10
    Last Post: 11-29-2008, 11:58 AM
  3. Stacks and queues info
    By Emeighty in forum C++ Programming
    Replies: 4
    Last Post: 11-02-2008, 01:41 AM
  4. stacks and dynamic arrays
    By Gil22 in forum C++ Programming
    Replies: 5
    Last Post: 03-10-2003, 08:16 PM
  5. using Stacks & Queues to compare Strings
    By eskimo083 in forum C++ Programming
    Replies: 1
    Last Post: 03-09-2003, 05:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21