{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

L3_Queue

# L3_Queue - What are Queues The second Data Structure that...

This preview shows pages 1–7. Sign up to view the full content.

What are Queues The second Data Structure that we learn is called a queue . Operations: Join at the tail of a queue. Leave from the head of a queue. Page 1 of 26

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What are Queues In computer science, we use queues to store values. 8 7 10 3 4 7 enqueue 8 10 3 4 7 10 3 Queue of integers 4 2 4 23 6 15 dequeue 2 4 23 6 2 4 23 6 Queue of integers 15 Page 2 of 26
What are Queues In computer science, we use queues to store values. 'p' 'n' 'e' 'v' 'b' 'n' enqueue 'p' 'e' 'v' 'b' 'n' 'e' 'v' Queue of characters 'b' 'k' 's' 'c' 'g' 'i' dequeue 'k' 's' 'c' 'g' 'k' 's' 'c' 'g' Queue of characters 'i' Page 3 of 26

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What are Queues Of course, we also have queues of floats, queues of shapes, etc. , but we are not going to show them here. Queue of floats Queue of shapes Queue of Page 4 of 26
Queue Operations The enqueue operation inserts a new element at the rear of a queue. enqueue Page 5 of 26

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The dequeue operation deletes and returns the element at the front of a queue. dequeue
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 26

L3_Queue - What are Queues The second Data Structure that...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online