What is the diference between a stack and a queue

Status
Not open for further replies.

theClonet

Newbie level 5
Joined
Feb 3, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
104
Hello,

Can anyoane explain please, what is the diference between a "stack" and a "queue" in RAM ?

When to use a stack and when to use a queue??

Thank you very much!!
 

A queue is FIFO "First-in-first-out"
A stack is LIFO "Last-in-first-out"
Which one to use really depends on your application.
 

    theClonet

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…