Senior .Net Developer Question: Download Senior .Net Developer PDF

What is the difference between a stack and a queue?

Tweet Share WhatsApp

Answer:

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.

Download Senior .Net Developer PDF Read All 60 Senior .Net Developer Questions
Previous QuestionNext Question
What is implement a generic action in WebAPI?Do you know what are three common acronyms used in .NET, and what do they stand for?