Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Search and Hash Tables

Similar presentations


Presentation on theme: "Linear Search and Hash Tables"— Presentation transcript:

1 Linear Search and Hash Tables
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] end if end FunSort

4 FunSort TL;DR

5 More on Homework 4 Program arguments Images
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
8946 9999

17

18 N Log(n) Log(log(n))

19 Announcements Participation 3 is due Homework 4: questions/issues?
Asking Sankar about programming questions.

20 Participation 3 Minimization of Maximum Regret

21

22 Hash Tables Definition:

23 Division Method

24

25

26 Multiplication Method

27

28

29 MAD (Multiply, Add, and Divide)

30 Considerations

31 Collisions

32 Chaining

33 Open Addressing

34 Linear Probing

35

36 Quadratic Probing

37

38 Double Hashing

39

40 Pseudocode

41 Deletion Chaining

42 Open Addressing

43 Runtime Analysis

44 Universal Hash Function

45

46

47 Perfect Hashing

48 Announcements Homework 4 due Homework 5 is up

49 Bloom Filters

50 Bloom Filter

51 Hash functions: Computation Key H1 H2

52 False Positives

53

54

55


Download ppt "Linear Search and Hash Tables"

Similar presentations


Ads by Google