The document discusses different types of queues, including their definitions, properties, and implementations. It defines a queue as a linear data structure with two ends - one for adding elements and one for removing them, following a FIFO (first-in, first-out) approach. Key points covered include common queue operations like insertion and removal; circular queues which wrap elements around to avoid overflow; priority queues which order elements by priority; and deques which allow additions and removals from both ends.
Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.
Queues
a. Concept and Definition
b. Queue as an ADT
c. Implementation of Insert and Delete operation of:
• Linear Queue
• Circular Queue
For More:
https://github.com/ashim888/dataStructureAndAlgorithm
http://www.ashimlamichhane.com.np/
Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.
Queues
a. Concept and Definition
b. Queue as an ADT
c. Implementation of Insert and Delete operation of:
• Linear Queue
• Circular Queue
For More:
https://github.com/ashim888/dataStructureAndAlgorithm
http://www.ashimlamichhane.com.np/
An ordered collection of items from which items may be deleted from one end called the front and into which items may be inserted from other end called rear is known as Queue.
It is a linear data structure.
It is called the First In First Out (FIFO) list. Since in queue, the first element will be the first element out.
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
Data Structure- Stack operations may involve initializing the stack, using it and then de-initializing it. Apart from these basic stuffs, a stack is used for the following two primary operations −
PUSH, POP, PEEP
An ordered collection of items from which items may be deleted from one end called the front and into which items may be inserted from other end called rear is known as Queue.
It is a linear data structure.
It is called the First In First Out (FIFO) list. Since in queue, the first element will be the first element out.
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
Data Structure- Stack operations may involve initializing the stack, using it and then de-initializing it. Apart from these basic stuffs, a stack is used for the following two primary operations −
PUSH, POP, PEEP
LINEAR QUEUE with Diagram and C implementation.
Operations of LINEAR QUEUE
Drawback of LINEAR QUEUE
CIRCULAR QUEUE with Diagram and C implementation
Operations of CIRCULAR QUEUE
PRIORITY QUEUE with Diagram and C implementation
Operations of PRIORITY QUEUE
CASE STUDIES
EXAMPLES
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. Introduction
● It is linear data structure
● It is collection of items – List
● Queue means line of items waiting for
their turn
● Queue has two ends
○ Elements are added at one end.
○ Elements are removed from the other end.
www.eshikshak.co.in
3. Queue
● Removal of data item is restricted at one
end known as FRONT
● Insertion of data item is restricted at other
end known as REAR
● The FRONT and REAR are used in
describing a linear list, when queue is
implemented
● First element inserted in list, will be the
first to be removed - FIFO
www.eshikshak.co.in
4. Queue as FIFO
● The element inserted first will be removed
first from the Queue
● Thus, Queue is known as FIFO (First In-
First Out) or FCFS (First Come First
Serve)
● Examples of Queue
○ People waiting in Queue to purchase tickets at
railway station or cinema hall, where the first person
in the queue will be served first
www.eshikshak.co.in
5. Representation of Queue
● It has two pointer varaibles
○ FRONT : Containing the location of the front
element of the queue
○ REAR : Containing the location of the rear
element of the queue
● When queue is empty
FRONT = -1 and REAR = -1
www.eshikshak.co.in
6. Operations of Queue
● Insertion
○ Adding an element in queue will increased
value of REAR by 1
■ REAR = REAR + 1
● Removal
○ Removing an element from queue will
increased value of FRONT by 1
■ FRONT = FRONT + 1
www.eshikshak.co.in
7. Queue FRONT = -1, REAR =
Empty -1
ADD(Q,10) FRONT = 0 ,REAR =
0
ADD(Q,20) FRONT = 0 ,REAR
=1
ADD(Q,30) FRONT = 0 ,REAR
=2
ADD(Q,40) FRONT = 0 ,REAR
=3
ADD(Q,50) FRONT = 0 ,REAR
=4
Remove(Q) FRONT = 1 ,REAR
=4
Remove(Q) FRONT = 2 ,REAR
=4
Remove(Q) FRONT = 3 ,REAR
=4
ADD(Q, FRONT = 3 ,REAR
60) =1 www.eshikshak.co.in
9. Queue as Array : Insert
Initially when the QUEUE is empty, set FRONT = NULL and REAR = 0
Step 1: start
Step2: [check for queue is over flow or not]
If (REAR >n) or (REAR==FRONT)
Print “queue is overflow”
else
go to step 3
Step 3: [enter the item]
QUEUE[REAR]=value
REAR=REAR+1
Step 4:[ check condition]
If(FRONT==null)
FRONT=0
Step 5:end
10. Queue as Array : Delete
Step 1: start
Step 2: [check for queue is under flow or not]
If front>N or front==Null
Print ”queue is underflow”
else
goto step 3
Step 3: [check condition]
If front==rear
Front==null
Rear=0
else
goto step 4
Step 4: [delete element]
Queue[front]=null
Step 5: front=front+1
Step 6: end
11. Circular Queue
● To solve this problem, queues implement
wrapping around. Such queues are called
Circular Queues.
● Both the front and the rear pointers wrap
around to the beginning of the array.
● It is also called as “Ring buffer”.
● Items can inserted and deleted from a queue in
O(1) time.
www.eshikshak.co.in
12. Circular Queue
● When a new item is inserted at the rear, the
pointer to rear moves upwards.
● Similarly, when an item is deleted from the
queue the front arrow moves downwards.
● After a few insert and delete operations the rear
might reach the end of the queue and no more
items can be inserted although the items from
the front of the queue have been deleted and
there is space in the queue.
www.eshikshak.co.in
13. QINSERT(Queue, N, FRONT, REAR, ITEM)
1 [Queue already filled ?]
if FRONT = 0 and REAR = N-1, or if FRONT=REAR + 1 then
write : Overflow and Return
2 [Find new value of REAR]
if FRONT=-1 then [Queue initially empty]
Set FRON T = 0 and REAR = 0
else if REAR = N-1 then
Set REAR = 1
else
Set REAR = REAR + 1
[End of If structure]
3 Set QUEUE[REAR] = ITEM [This inserts new element]
4 Return
14. QDELETE(Queue, N, FRONT, REAR,
ITEM)
1 [Queue already empty]
If FRONT = -1, then Write : Underflow and Return
2 Set ITEM = Queue[FRONT]
3 [Find new value of FRONT]
If FRONT = REAR, then [Queue has only one element to start]
Set FRONT = -1 and REAR = -1
Else if FRONT = N-1, then
Set FRONT = 0
Else
Set FRONT = FRONT + 1
[End of If Structure]
4 Return
16. Priority Queue
● It is collection of elements where elements are
stored according to the their priority levels
● Inserting and removing of elements from queue
is decided by the priority of the elements
● The two fundamental methods of a priority
queue P:
○ insertItem(k,e): Insert an element e with key k into P.
○ removeMin(): Return and remove from P an element
with the smallest key.
www.eshikshak.co.in
17. Priority Queue
● When you want to determine the priority
for your assignments, you need a value
for each assignment, that you can
compare with each other.
● key: An object that is assigned to an
element as a specific attribute for that
element, which can be used to identify,
rank, or weight that element.
www.eshikshak.co.in
18. Example: Student records
Any of the attributes, Student Name, Student Number, or Final Score
Student Name ID Final Score (out
can be used as keys. of 450)
Note: Keys may not be unique (Final Score).
Ashwin 09BCA08 310
Payal 09BCA80 311
Darshika 09BCA24 380
Nilkamal 09BCA75 400
Nikunj 09BCA74 440
Mori 09BCA102 400
www.eshikshak.co.in
19. Rules to maintain a Priority Queue
● The elements with the higher priority will
be processed before any element of lower
priority
● If there are elements with the same
priority, then the element added first in
the queue would get processed
www.eshikshak.co.in
20. Priority Queue Insert
PQInsert (M, Item)
Step 1 Find the Row M
Step2 [Reset the Rear Pointer]
If Rear[M] = N-1 then Rear[M] = 0
Else
Rear[M] = Rear[M]+1
Step 3 [Overflow]
If Front[M] = Rear[M] then Write (“This Priority Queue is full”)
Return
Step 4 [Insert Element]
Q[M] [Rear[M]] = then
Step 5 [Is Front Pointer Properly Set]
If Front[M] = -1 then Front[m] = 0
Return
Step 6 Exit
www.eshikshak.co.in
21. Priority Queue Delete
PQDelete (K, Item)
Step 1 Initialize K = 0
Step 2 while (Front[K] = -1)
K = K+1
[To find the first non empty queue]
Step 3 [Delete Element]
Item = Q[K] [Front[K]
Step 4 [Queue Empty]
If Front[K] = N-1 then Front[K] = 0
Else
Front[K] = Front[K]+1
Return Item
Step 6 Exit
www.eshikshak.co.in
22. Deque
● Deque stands for double-end queue
● A data structure in which elements can be
added or deleted at either the front or rear
● But no changes can be made in the list
● Deque is generalization of both stack and
queue
www.eshikshak.co.in
23. Removing Element from Deque
● There are two variations of a deque.
These are
○ Input Restricted Deque
■ An input restricted deque restricts the insertion of
elements at one end only, but the deletion of
elements can perform at both the ends.
○ Output Restricted Deque
■ An output restricted queue, restricts the deletion
of elements at one end only, and allows insertion
to be done at both the ends of deque
www.eshikshak.co.in
24. Possibilities
● The two possibilities that must be
considered while inserting or deleting
elements into the queue are :
○ When an attempt is made to insert an
element into a deque which is already full, an
overflow occurs.
○ When an attempt is made to delete an
element from a deque which is empty,
underflow occurs.
www.eshikshak.co.in
26. Inserting Element in Deque
InsertQatEnd(dq,7) 7
Front Rear
InsertQatBeg(dq,10) 7
Front Rear
InsertQatBeg(dq, 7
10)
Front Rear
www.eshikshak.co.in
27. InsertQatBeg(dq,10) 10 7
Front Rear
InsertQatEnd(dq,4)
10 7 4
Front Rear
InsertQatBeg(dq,15) 15 10 7 4
Front Rear
InsertQatEnd(dq,55)
15 10 7 4 55
Front www.eshikshak.co.in Rear
28. Removing Element from Deque
delQBeg() 10 7 4 55
Front Rear
delQBeg() 7 4 55
Front Rear
InsertQatEnd(dq,23) 7 4 55 23
Front Rear
www.eshikshak.co.in
29. Deque : Insert
● There are two variations of a deque.
These are
○ Input Restricted Deque
■ An input restricted deque restricts the insertion of
elements at one end only, but the deletion of
elements can perform at both the ends.
○ Output Restricted Deque
■ An output restricted queue, restricts the deletion
of elements at one end only, and allows insertion
to be done at both the ends of deque
www.eshikshak.co.in
30. Input Restricted queue : Insert Element
Step 1: start
Step 2:[check condition for overflow]
If(rear==N-1 && front==0 or front=rear+1)
Print “over flow”
else
goto step 3
Step 3: [check condition]
If(front==null)
front = 0 and rear=-1
else
goto step 4
Step 4: [check condition and value]
If (rear== N -1)
rear=0
Else
rear=rear+1
Step 5: [Add value]
dq[rear]=value
Step 6:end
www.eshikshak.co.in