You are on page 1of 12

HASH TABLES

Presented by : Louie bucio


9/3/20XX 2

HASH TABLES

HASHING
Hash table 2 functions
Perfect hashing
HASH TABLES

Introduction
A Hash Table is a data structure that stores data in an
associative manner. It is made up of two parts: an array,
where the data is stored, and a Hash Function which is a
mapping function. Hash tables are a type of data structure
used to efficiently store large sets of data. The data is
stored in the form of key-value pairs. The two key parts
while working with hash tables are hashing and collisions.

9/3/20XX 3
TOPIC ONE
What is hash?
HASH TABLE
What is hash table?

A hash table, also known as a hash map,


is a data structure that maps keys to
values. It is one part of a technique called
hashing, the other of which is a hash
function. A hash function is an algorithm
that produces an index of where a value
can be found or stored in the hash table.

5
What is the function of hash?
Subtitle

• Hashing is a one-way function where • Hashing is designed to solve the


data is mapped to a fixed-length value. problem of needing to efficiently find or
Hashing is primarily used for store an item in a collection. For
authentication. Salting is an additional example, if we have a list of 10,000
step during hashing, typically seen in words of English and we want to check
association to hashed passwords, that if a given word is in the list, it would be
adds an additional value to the end of inefficient to successively compare the
the password that changes the hash word with all 10,000 items until we find
value produced. a match.
HASH TABLE AND
FUNCTIONS
HASH TABLE AND HASH FUNCTION PRESENTATION TITLE

HASH TABLE HASH FUNCTION


• In computing, a hash table, also known • A hash function is any function that can
as hash map, is a data structure that be used to map data of arbitrary size to
implements an associative array or fixed-size values. The values returned
dictionary. It is an abstract data type that by a hash function are called hash
maps keys to values. values, hash codes, digests, or simply
hashes.

9/3/20XX 8
PERFECT HASHING
Perfect hashing is defined as a model of hashing in which any set of n elements can be
stored in a hash table of equal size and can have lookups performed in constant time.

9/3/20XX PRESENTATION TITLE 10


PERFECT HASHING
Perfect hashing is a technique for storing records in a
hash table in a way that guarentees no collisions.
Perfect hashing sort of turns the concept of hashing on
its head, in that it requires that the full set of keys to
be stored be available in advance, and a hash function
is then generated for that key set.
THANK YOU

12

You might also like