Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are differences between stack and queue data structure?
Home
DBMS
What are differences between stack and queue data structure?
0
votes
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
What are differences between stack and queue data structure?
data-structure-interview-questions
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Aug 9, 2023
by
DavidAnderson
Stack
Queue
Stack is a linear data structure where data is added and removed from the top.
Queue is a linear data structure where data is ended at the rear end and removed from the front.
Stack is based on LIFO(Last In First Out) principle
Queue is based on FIFO(First In First Out) principle
Insertion operation in Stack is known as push.
Insertion operation in Queue is known as eneque.
Delete operation in Stack is known as pop.
Delete operation in Queue is known as dequeue.
Only one pointer is available for both addition and deletion: top()
Two pointers are available for addition and deletion: front() and rear()
Used in solving recursion problems
Used in solving sequential processing problems
Related questions
0
votes
Q: What are different operations available in queue data structure?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What is a queue data structure? What are the applications of queue?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What are different operations available in stack data structure?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What is a stack data structure? What are the applications of stack?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: How to implement a queue using stack?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: Can you explain the difference between file structure and storage structure?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What is a linked list data structure? What are the applications for the Linked list?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What is array data structure? What are the applications of arrays?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: What is hashmap in data structure?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
0
votes
Q: How do you implement stack using queues?
asked
Aug 9, 2023
in
DBMS
by
DavidAnderson
data-structure-interview-questions
...