Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

What is difference between Stack and Queue?

Ads
banner
banner
rahhulkumar1 Offline referral

Posts: 53
Joined: Oct 2015
Reputation: 1

#1
Member
What’s difference between Stack and Queue?
manvisen Offline referral

Posts: 40
Joined: Jul 2016
Reputation: 0

#2
Junior Member
In stack objects are inserted and removed at the same end. In Queue objects are inserted and removed from different ends.
Stack operations are called push and pop.In queue operation are called enqueue and dequeue.
Stack is a LIFO data structure and Queue is a FIFO data structure.
spiderblue Offline referral

Posts: 25
Joined: Nov 2016
Reputation: 0

#3
Junior Member
Hi,

Items are inserted at other end called 'rear' of the queue. The first item inserted is the first to be removed (FIFO). It allows access to only one data item: the last item inserted. ... A stack is sometimes referred to as a Last-In-First-Out (LIFO) or First-In-Last-Out (FILO) structure.
aakashpatel Offline referral

Posts: 40
Joined: Feb 2017
Reputation: 0

#4
Junior Member
Hi,

Stack is a First- In-First-Out type data structure and Queue is Last-In-First-Out type data structure.

Stack is defined as a list of element in which we can insert or delete elements only at the top of the stack.
Queue is a collection of the same type of element. It is a linear list in which insertions can take place at one end of the list,called rear of the list, and deletions can take place only at other end, called the front of the list.

Stack has 1 pointer called TOP pointer.
Queue has 2 pointer REAR and FRONT.
damponting44 Offline referral

Posts: 272
Joined: Oct 2016
Reputation: 0

#5
Senior Member
A stack is a gathering of items in which objects are gotten to in LIFO (Last In First Out) form. Though a line is an accumulation of articles in which objects are gotten to in FIFO (First In First Out) arrangement.





User(s) browsing this thread: 1 Guest(s)