CSC263H5 Lecture Notes - Lecture 2: Priority Queue, Bandwidth Management, Job Scheduler

66 views7 pages

Document Summary

Csc209h5s - software programming and tools (winter 2018) Week 2 - priority queue (january 12, 2018) Ps1 out; due on january 27, 2018. Discussion board is available; check larry"s page for past slides. Queue: first in first serve; a collection of elements. Dequeue(q) - return first person in queue and remove from queue. Peekfront(q) - returns the first element of queue without dequeuing it. A collection of elements with priorities (ie. each element x has x. priority) Extractmax(q) - removing an element from the queue (the one with the. Increasepriority(q,x,k) - increase x. priority to k highest priority); similar to dequeue. Find minimum spanning tree of a graph (max)-priority queue implementation. Using an unsorted linked list (40 33 18 65 24 25) Just insert x at the head which takes theta(1) X is a reference to the item/element (you are passing in the reference to the element/item) Just change x. priority to k, which takes theta(1)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents