Difference Between Stack and Queue - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Difference Between Stack and Queue

Difference Between Stack and Queue

Difference Between Stack and Queue

Stack
Queue
In stack the insertion and deletion operation take place only one end called top end
In queue insertion operation take place one end and deletion operation take place another end
In stack the element which is inserted last is first to delete
In queue the element which is inserted first is first to delete
Stack require only one pointer called TOP
Queue requires two pointers called front and rear.
Example : piles of trays in cafeteria
Example : student at registration counter
In stack there is no wastage of memory space.
In queue even if we have free memory space sometimes we cannot use that space to store elements.

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.