Download presentation
Presentation is loading. Please wait.
Published byDennis Austen Parker Modified over 9 years ago
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
8
Searching Definition:
9
Searching Unsorted Array
11
Jump Search
14
Binary Search
16
Interpolation/Phonebook Search 0…8946…9999
18
NLog(n)Log(log(n))
19
Hash Tables Definition:
20
Division Method
23
Multiplication Method
26
MAD (Multiply, Add, and Divide)
27
Considerations
28
Collisions
29
Chaining
30
Open Addressing
31
Linear Probing
33
Quadratic Probing
35
Double Hashing
37
Deletion Chaining
38
Open Addressing
39
Runtime Analysis
40
Perfect Hashing
41
Universal Hash Function
44
Bloom Filters
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.