Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topic 11 Heaps and Tries.

Similar presentations


Presentation on theme: "Topic 11 Heaps and Tries."— Presentation transcript:

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

4

5

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

13

14

15 Pseudocode

16 Heap Operations: delete-max/min

17

18

19 Announcements Mid-semester Survey (soon) Practice quizzes to be posted
Participation questions?

20 Heap Operations: build-heap

21

22

23 Example

24

25

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

35

36

37

38

39

40

41 Alphabet Trie (alphabet from English alphabet)

42

43

44

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)

50

51

52 Searching for Suffixes

53 Example

54

55


Download ppt "Topic 11 Heaps and Tries."

Similar presentations


Ads by Google