Reynald defines a queue is: a collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. He then provides a visual representation so that the student is fully prepared to write their own version in the video that follows.
- [Instructor] Let's now talk about the queue…data structure.…Which is somewhat similar to a stack…but it works differently.…A queue is a particular kind of data structure…in which the items and the collection…are kept in an order where…any addition to items…are to the rear position.…And that's known as enqueue.…So think of a line.…When someone comes to a line…they're usually going to the end.…Likewise, the removal of an item or element…are from the front position.…
And that's known as dequeueing.…So as a result,…we're talking about a first in, first out data structure.…Also known as FIFO.…So, whenever we're talking about a queue…always think in terms of a line…that people would go in.…The person that was the front of the line…is the first one that's going to be served.…And whoever comes in last,…is going to be at the end of the line.…If we're thinking in terms of a data structure…let's look at this image here.…
Items are being inserted from…left…moving on forward to the right.…So the letter S…was the first item that was entered into the collection…
- Working with linked lists
- Creating a stack
- Defining a queue
- Performing a binary search
- Finding target values with a linear search
Skill Level Beginner
1. Algorithms and Data Structure Overview
Reasons for this course1m 26s
2. Linked List
5. Binary Search
6. Linear Search
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.