5. WHAT IS A STACK
• A Stack class represents a last-in, first out (LIFO) collection of object.
• It is used when you need a last-in, first-out access of items.
6. PRACTICAL USES OF A STACK
• The stack of trays in a cafeteria
• A stack of plates in a cupboard
• A driveway that is only one car wide
10. WHAT IS A QUEUE
• Queue collection class is a concept in C# that is included in the System.Collection
namespace.
• The elements are stored in a QUEUE in FIFO.
• The first element added will be the first to go out like a queue of people outside a
movie hall to buy tickets.
11. PRACTICAL USES OF A QUEUE
• Single-lane one-way road where the vehicle enters first, exits first.
• Ticket windows
• Bus-stops
• Starbucks line
12. QUEUE SYNTAX
• Enqueue() method to add values
• Dequeue() method to retrieve values
• Continue to Live Walkthru
16. DISCUSSION
• Why is this important?
• How can this be useful to me?
• How can I use this in my current
job?
• How can I use this in my future
career?
• What will I get out of this?
• How is this used in the real world
Regroup and discuss after…