Download presentation
Presentation is loading. Please wait.
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
8
Searching Definition:
9
Searching Unsorted Array
11
Jump Search
14
Binary Search
16
Interpolation/Phonebook Search
… 8946 9999
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
22
Hash Tables Definition:
23
Division Method
26
Multiplication Method
29
MAD (Multiply, Add, and Divide)
30
Considerations
31
Collisions
32
Chaining
33
Open Addressing
34
Linear Probing
36
Quadratic Probing
38
Double Hashing
40
Pseudocode
41
Deletion Chaining
42
Open Addressing
43
Runtime Analysis
44
Universal Hash Function
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.