From the course: Python Data Structures and Algorithms
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Understand the queue data structure - Python Tutorial
From the course: Python Data Structures and Algorithms
Understand the queue data structure
- [Instructor] The next data structure we're going to look at is the queue. Now, a queue in computing is very similar to a queue in real life and that you have an arrival order which you wish to maintain. There are many applications of the queue data structure. So for example inside of the CPU, whenever you have data transferred asynchronously between two processes we need some way of maintaining the order the original order. Several graph traversal algorithms, including the ones we're looking at in this course, and many other applications, often when a resource to be shared among multiple consumers is when a queue becomes relevant. So a queue is a data structure in which all additions are made at one end called the rear or tail of the queue. And all deletions are made from the other end called the head or front of the queue. Which end actually serves as the head and which is the tail is an implementation detail. In this course, we will consider the left to be the head of our queues…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.