lecture24 - CSCI-255 Advanced Data Structures Lecture 24...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI-255 Advanced Data Structures Lecture 24
Background image of page 1

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

View Full Document Right Arrow Icon
Recap: Time Complexity of Basic AVL Tree Operations b Insert s Maximum possible number of rotations = 1 b Delete s Maximum possible number of rotations = lg( n ) b Worst case times s Search: O(lg n ) s Insert: O(lg n ) s Delete: O(lg n ) s What about Max?
Background image of page 2
Priority Queues b A priority queue is an ADT where: s Each element has an associated priority s Efficient extraction of the highest-priority element is supported b Typical operations of a priority queue are: s Enqueue (insert an element) s Dequeue (remove the highest-priority element) s Max (return the highest-priority element) b Applications b Process scheduling. Several processes require CPU time. Priority may be based on several factors b Etc … b Can be implemented as a Binary Heap
Background image of page 3

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

View Full Document Right Arrow Icon
Binary Heaps b Binary heap = s a binary tree that is s complete b every level except possibly the bottom one is completely filled and the leaves in the bottom level are as far left as possible s satisfies the heap property : b
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 14

lecture24 - CSCI-255 Advanced Data Structures Lecture 24...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online