Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary queues and its types

Rating
-
Sold
-
Pages
10
Uploaded on
26-02-2023
Written in
2022/2023

Easy to understand and in short about the topics with key points and last moment revision notes for exam

Institution
Course

Content preview

Queue
1. A queue can be defined as an ordered list which enables insert operations to be
performed at one end called REAR and delete operations to be performed at another
end called FRONT.

2. Queue is referred to be as First In First Out list.

3. For example, people waiting in line for a rail ticket form a queue.




Array representation of Queue
We can easily represent queue by using linear arrays.

There are two variables i.e. front and rear, that are implemented in the case of every
queue.

Front and rear variables point to the position from where insertions and deletions are
performed in a queue.

Initially, the value of front and queue is -1 which represents an empty queue.

Array representation of a queue containing 5 elements along with the respective values
of front and rear, is shown in the following figure.

, The above figure shows the queue of characters forming the English word "HELLO".

Since, No deletion is performed in the queue till now, therefore the value of front
remains -1 .

However, the value of rear increases by one every time an insertion is performed in the
queue.

After inserting an element into the queue shown in the above figure, the queue will
look something like following. The value of rear will become 5 while the value of front
remains same.

Written for

Institution
Course

Document information

Uploaded on
February 26, 2023
Number of pages
10
Written in
2022/2023
Type
SUMMARY

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
yashonandan9480

Get to know the seller

Seller avatar
yashonandan9480 bengaluru city university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions