wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Seatwork HASH (Data Structure)

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

Define a data item having some data and key, based on which the search is to be conducted in a hash table

a)

Insert

b)

Delete

c)

Key

d)

Data Item

2.

What is a hash table?

a)

A structure that maps values to keys

b)

A structure that maps keys to values

c)

A structure used for storage

d)

A structure used to implement stack and queue

3.

________ is a data structure which stores data in an associative manner.  

a)

Storage

b)

Key-value pairs

c)

Hash Table

d)

Hash Table

4.

What is a hash function?

a)

A function has allocated memory to keys

b)

A function that computes the location of the key in the array

c)

A function that creates an array

d)

A function that computes the location of the values in the array

5.

Which of the following is not a technique to avoid a collision?

a)

Make the hash function appear random

b)

Use the chaining method

c)

Use uniform hashing

d)

Increasing hash table size

6.

What is the load factor?

a)

Average array size

b)

Average key

c)

Average chain length

d)

Average hash table length

7.

Give 4 distinct aspects of how hash table works: (You can choose multiple options)

a)

Storage

b)

Key-value pairs

c)

A hashing function

d)

Table operations

e)

A load operator

8.

Once we have the key-value pair, we pass them to the hash table to store the data for later retrieval.

a)

Hash functions

b)

Storage

c)

Key

d)

Operation

9.

What is simple uniform hashing?

a)

Every element has equal probability of hashing into any of the slots

b)

A weighted probabilistic method is used to hash elements into the slots

c)

Elements has Random probability of hashing into array slots

d)

Elements are hashed based on priority

10.

Choose the 3 Basic Operations in hash table:

a)

Search 

b)

Insert 

c)

Update

d)

Delete