lec14 - Outline Hashing: ADT Definitions and Basic...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Outline Hashing: ADT Definitions and Basic Operations Chaining Open Addressing Analysis Lecture 14, Hashing: p. 1 Hashing: ADT Insert: add a new key into the data set Delete: delete a key from the data set Search: if the key is contained, return the key, otherwise return NULL Lecture 14, Hashing: p. 2 Aimed Running Time and Space Table size: M , which is much larger than the number of keys n , stored in the data set. Insert: O (1) time Delete: O (1) time Search: O (1) time Not based on the comparison-based model Lecture 14, Hashing: p. 3 Definitions and Basic Operations Table size: M Load factor: n/M Hashing function: given a key k U , where U is the universe of the keys, the hashing function maps k to a value in 0 ,...,M- 1, which can be used as an index in an array of size M Hash Table: it is an array ht [0 ...M- 1] Each h [ i ] is a slot or a bucket Keys are currently integers, which can be transformed in other forms, later...
View Full Document

Page1 / 8

lec14 - Outline Hashing: ADT Definitions and Basic...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online