Download presentation
Presentation is loading. Please wait.
1
Topic 11 Heaps and Tries
2
Announcements Grading Homework 5 solutions will be up today
Homework 3 to be graded by today Homework 4 to be graded tomorrow/Thursday Homework 5 solutions will be up today Test in 1.5 weeks Online students: make sure you can take the test on Thursday/Friday. Participation Schedule
3
Homework 5 solutions
6
Heaps Priority Queues Definition:
7
Heap Property
8
Representation/Implementation
9
Array attributes
10
Example representation
11
Calculating Parent/Child
12
Heap Operations: Insertion
15
Pseudocode
16
Heap Operations: delete-max/min
19
Announcements Mid-semester Survey (soon) Practice quizzes to be posted
Participation questions?
20
Heap Operations: build-heap
23
Example
26
Pseudocode
27
Heap Sort
28
Basic Idea
29
Example
30
Pseudocode
31
Stability Original Sorted
32
Tries
33
Definition Definition:
34
Adding fixed-length keys
41
Alphabet Trie (alphabet from English alphabet)
45
Analysis (compressed tries)
Search Insertion # nodes s
46
Uses Sort? Search?
47
Announcements Participation due Past quizzes and survey are up
No more programs Test is next week Online students: take midterm the same time as midterm 1 Heap sort best case – O(nlogn)
48
Participation (problem 1)
49
Participation (problem 2)
52
Searching for Suffixes
53
Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.