Hashing

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Flashcards about Hashing

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

Hashing Function

A method of storing data that converts keys (often strings) into integers for indexing a storage array.

2
New cards

Hash Table

Elements are stored in buckets; each element has a unique key; hash function generates a hash code to determine the bucket.

3
New cards

Hash Function

A function that maps keys to array indices (buckets).

4
New cards

Hashing Function

Compute indices to determine where entries will be stored and found.

5
New cards

Better Hashing Function

Using first four letters: index = L1 + L2×26 + L3×26^2 + L4×26^3.

6
New cards

Large Indices

index = rawIndex % size.

7
New cards

Hash Retrieval Stages

Two stages: compute index using hashing function and Search chain in array element for a match.

8
New cards

Key-Value Pair

Stores data where each element (the value) is associated with a unique identifier (the key).

9
New cards

Hash Table ADT

Stores key-value

10
New cards

Hash Table ADT Operations

put(t,

11
New cards

What happens if chains grow too long?

Becomes less efficient.

12
New cards

Summary of Hashing

To minimise collisions, use an array larger than the set of keys and ensure hashing minimize Collisions with a wide range of index values and uniform distribution.

13
New cards

FastHub

Open every weekday afternoon in B77 Infolab.

14
New cards

Hash function

Takes the key of an element to generate a hash code.

15
New cards

Chains

Are lists.