View Full Version : What’s difference between Stack and Queue?
Shivangi Panwar
05-30-2016, 04:26 AM
What’s difference between Stack and Queue?
itil service transition training (http://gogotraining.com/training/courses/240/itil-2011-service-transition--axelos-and-exin-accredited-training/) itil service operation training (http://gogotraining.com/training/courses/237/itil-2011-service-operation--axelos-and-exin-accredited-training/) itil service design training (http://gogotraining.com/training/courses/238/itil-2011-service-design--axelos-and-exin-accredited-training/) itil service strategy training (http://gogotraining.com/training/courses/239/itil-2011-service-strategy--axelos-and-exin-accredited-training/)
priya01
05-30-2016, 04:34 AM
Stack and Queue both are used as placeholder for a collection of data. The primary difference between a stack and a queue is that stack is based on Last in First out (LIFO) principle while a queue is based on FIFO (First In First Out) principle.
introduction to programming (http://gogotraining.com/training/courses/287/introduction-to-programming-and-coding-for-everyone-with-javascript/) oracle dba training (http://gogotraining.com/training/courses/288/oracle-12c-database-administration-i-part-1/) java se 8 programming (http://gogotraining.com/training/courses/306/java-se-8-programming-part-1/) itil service operation training (http://gogotraining.com/training/courses/237/itil-2011-service-operation--axelos-and-exin-accredited-training/)
forum1
05-30-2016, 06:33 AM
Stack is toward the end in first out(LIFO). that is which is entered last will be recovered firstly. case of stack is arranging plates in one above one.
Line is first in first out(FIFO). That is which is entered first will be served first. Example is standard line in temporary store.
Download Wordpress Plugins (https://edorb.com/downloads/category/wordpress-plugins/)
ajay49560
05-30-2016, 06:46 AM
A stack is defined as a list or sequence of elements that is lengthened by placing new elements "on top" of existing elements and shortened by removing elements from the top of existing elements. It is an ADT[Abstract Data Type] with math operations of "push" and "pop".
A queue is a sequence of elements that is added to by placing the new element at the rear of existing and shortened by removing elements in front of queue. It is an ADT[Abstract Data Type]. There is more to these terms understood in programming of Java, C++, Python and so on.
pahichu
05-30-2016, 10:52 AM
Queue:
Queue is a ordered collection of items.
Items are deleted at one end called ‘front’ end of the queue.
Items are inserted at other end called ‘rear’ of the queue.
The first item inserted is the first to be removed (FIFO).
Stack:
Stack is a collection of items.
It allows access to only one data item: the last item inserted.
Items are inserted & deleted at one end called ‘Top of the stack’.
It is a dynamic & constantly changing object.
All the data items are put on top of the stack and taken off the top
This structure of accessing is known as Last in First out structure (LIFO)
moglix
05-31-2016, 04:41 AM
Traditionally, Queues and Stacks are used as containers to hold objects and retrieve them out in a specific order, which facilitates different types of operations. A Stack operates as a First In Last Out (FILO) container while a Queue operates as a First In First Out (FIFO) container.
Astrosameer
06-02-2016, 02:10 AM
Stack based on (LIFO) and queue based on(FIFO).
Olin Lamanna
06-02-2016, 08:36 AM
Stack is a last in first out data structure. The associated link to wikipedia contains detailed description and examples. Queue is a first in first out data structure. The associated link to wikipedia contains detailed description and examples, as stackoverflow website explained.
wpcycle.com
06-06-2016, 01:43 PM
Stack is based on pancakes and Q is a letter.
johnseward
06-07-2016, 10:27 PM
insert a new item, and remove an item two basic operations in stack and queue
first-in-first-out or FIFO The rule used for a stack . last-in first-out or LIFO The rule used for a QUEUE
Bluesky94
10-31-2016, 10:31 AM
A stack is defined as a list or sequence of elements that is lengthened by placing new elements "on top" of existing elements and shortened by removing elements from the top of existing elements.
A queue is a sequence of elements that is added to by placing the new element at the rear of existing and shortened by removing elements in front of queue. It is an ADT[Abstract Data Type]. There is more to these terms understood in programming of Java, C++, Python and so on.
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.