Deck 5: Hash Tables

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

10 Terms

1
New cards

What is a hash table?

A structure that stores data using hash values.

2
New cards

What is a hash function?

A function that converts a key into a bucket location.

3
New cards

What is a bucket?

A storage location within a hash table.

4
New cards

What is a collision?

Two keys map to the same bucket.

5
New cards

What is chaining?

Resolving collisions using linked lists.

6
New cards

What is the load factor?

Number of stored elements ÷ number of buckets.

7
New cards

Why is load factor important?

High load factors increase collisions and reduce performance.

8
New cards

What does HashMap store?

Key-value pairs.

9
New cards

What does HashSet store?

Unique elements.

10
New cards

Difference between TreeSet and HashSet?

TreeSet is sorted. HashSet is not sorted.