Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topic 9 Linear Search and Hash Tables. Announcements Participation due tomorrow FunSort explanation posted.

Similar presentations


Presentation on theme: "Topic 9 Linear Search and Hash Tables. Announcements Participation due tomorrow FunSort explanation posted."— Presentation transcript:

1 Topic 9 Linear Search and Hash Tables

2 Announcements Participation due tomorrow FunSort explanation posted

3 FunSort FunSort(list, low, high) returns list if (low < high) then FunSort(list, low, high-1) if list[high-1] > list[high] then swap list[high-1] and list[high] FunSort(list, low, high-1) end if end FunSort

4 FunSort TL;DR 5 4 3 2 1 … 3 4 5 2 1

5 More on Homework 4 Program arguments public static void main(String[] args) { for (int i = 0; i < args.length; i++) System.out.println(args[0]); } bash$ java cs345_prog1 hello world hello world Images

6

7

8 Searching Definition:

9 Searching Unsorted Array

10

11 Jump Search

12

13

14 Binary Search

15

16 Interpolation/Phonebook Search 0…8946…9999

17

18 NLog(n)Log(log(n))

19 Hash Tables Definition:

20 Division Method

21

22

23 Multiplication Method

24

25

26 MAD (Multiply, Add, and Divide)

27 Considerations

28 Collisions

29 Chaining

30 Open Addressing

31 Linear Probing

32

33 Quadratic Probing

34

35 Double Hashing

36

37 Deletion Chaining

38 Open Addressing

39 Runtime Analysis

40 Perfect Hashing

41 Universal Hash Function

42

43

44 Bloom Filters

45

46

47

48

49


Download ppt "Topic 9 Linear Search and Hash Tables. Announcements Participation due tomorrow FunSort explanation posted."

Similar presentations


Ads by Google