Download presentation

Presentation is loading. Please wait.

1
CS2420: Lecture 19 Vladimir Kulyukin Computer Science Department Utah State University

2
Outline Binary Search Trees (Chapter 4) HeapSort (Chapter 7)

3
Binary Search Tree: Average Case Analysis Recall that the depth of the node is the length of the unique path from the root to that node. The sum of the depths of all nodes in the tree is the internal path length. The average case makes the assumption that all possible insertion/deletion sequences are equally likely.

4
Binary Search Tree: Average Case Analysis

8
The Heap-Order Property A Heap is a Complete Binary Tree. The Heap-Order Property: –In a heap, for every node X with parent P, the key in P is smaller than or equal to the key in X (minimal heap). –In a heap, for every node X with parent P, the key in P is greater than or equal to the key in X (maximum heap).

9
The Heap-Order Property P X P X The minimum heap-order property The maximum heap-order property

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google