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
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
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.
alright, thanks
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.