Discover the different types of specialized queues that exist in computer science and learn how they are useful for prioritizing specific pieces of data and keeping an order between various elements.
- Along with our normal queues,…we also have specialized queues…that add extra elements and constraints…to this data structure.…First we have a priority queue,…which is like a queue,…but each element also has a priority associated with it.…Items can be added at any time to our priority queue,…but the next item to be dequeued…is the item with the highest priority.…The priority of a given element…often determines when that element is dequeued…because an element with a high priority…is dequeued before an element with low priority.…
This priority could be as simple as a number…so that new items could be added to the queue…ahead of those already there.…However, if you add multiple items that have…the same priority, they will queue as normal…first-in, first-out order.…Of course, if something comes along with a higher priority,…then it will go ahead of them in the queue,…and it would be dequeued from the queue beforehand.…Now what that priority means is up to you.…Typically you'll have to implement a comparator…or compare functions, as when sorting a raise,…
- Data types: Booleans, numbers, strings, and more
- Multidimensional arrays
- Jagged arrays
- Search and sort arrays
- Linked lists
- Stacks and queues
- Hash functions and hash tables
- Trees and graphs
Skill Level Intermediate
Understand data structures1m 25s
1. Introduction to Data Structures
4. Stacks and Queues
5. Hash-Based Data Structures
6. Trees and Graphs
- 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.