CMPT 115 Lecture Notes - Lecture 17: Perfect Hash Function, Pseudorandom Number Generator, Hash Table

58 views16 pages
9 May 2016
School
Course
Professor

Document Summary

Notes written by michael horsch, mark eramian, ian mcquillan, lingling jin, and dmytro dyachuk. 1 introduction: we"ve seen di erent ways to search arrays: Binary search ((log n): binary search was more e cient, but required the table to be sorted, we can do betterwithout requiring a sorted array, a table is just a list of records with di erent elds: 1: like an array, each table row has an index starting at 0, a table can easily be represented by an array of structures. Team reftostring teamname int wins int losses end team. Team westernconference[8: a simple array of, say, integers is just a table with a single column, if the table is an array: Linear search o(n) worst case time complexity. Binary search (if the table is sorted already) o(log n) worst case time complexity: if the table is a linked-list: Linear search o(n) worst case time complexity: if the table is a binary search tree:

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents