What is the difference between a stack and a queue?

Submitted by: Muhammad
This .NET interview question tests candidates' basic knowledge of collections. Along with stacks and queues in this category are hash tables, bags, dictionaries and lists. A stack keeps track of what is executing and contains stored value types to be accessed and processed as LIFO (Last-In, First-Out), with elements inserted and deleted from the top end.

A queue, on the other hand, lists items on a FIFO (First-In, First-Out) basis in terms of both insertion and deletion, with items inserted from the rear end and deleted from the front end of the queue.
Submitted by: Muhammad

Read Online Senior .Net Developer Job Interview Questions And Answers