No products in the cart.

Difference between stack /queue and array

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Difference between stack /queue and array
  • 1 answers

Sia ? 3 years, 5 months ago

QUEUES ARRAY STACK
Queues are based on the FIFO principle, i.e., the element inserted at the first, is the first element to come out of the list. In the array the elements belong to indexes, i.e., if you want to get into the fourth element you have to write the variable name with its index or location within the square bracket. Stacks are based on the LIFO principle, i.e., the element inserted at the last, is the first element to come out of the list.
Insertion and deletion in Queues takes place only from rear and front respectively. Insertion and deletion in array can be done at any index in the array. Insertion and deletion in stacks take place only from one end of the list called the top.
Queue has a dynamic and fixed size. Array has a fixed size. Stack has a dynamic and fixed size.
Queue can contain elements of different data type. Array contains elements of same data type. The stack can contain elements of the different data types.
Different types of Queues are circular queue, priority queue, doubly ended queue. Different types of Arrays are 1D, 2D, etc. Stack has only one type.
http://mycbseguide.com/examin8/

Related Questions

What is mean by buffering in file handling?
  • 1 answers
What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App