wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Y13 Alevel CS Hash tables

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

If a list of items is in random order use a

a)

Binary search

b)

Linear Seach

2.

Hashing gives each item

a)

A sequential address

b)

A logarithmic address

c)

No address

d)

A unique address

3.

A hash table is

a)

an abstract data structure

b)

an array

c)

an integer

d)

made of pine

4.

Address <----- key MOD(numberOfSlots)

IF KEY = 5432 and numberOfSlots = 1000

Address = ?

a)

5

b)

432

c)

543

d)

5432

5.

Address <----- key MOD(numberOfSlots)

IF KEY = 5432 and numberOfSlots = 100

Address = ?

a)

5

b)

4

c)

32

d)

5432

6.

when an algorithm generates the same address for different primary keys it is known as

a)

Knock

b)

Bang

c)

Collisions

d)

DoubleHash

7.

a synonym is

a)

a word bank

b)

a key

c)

a collision

d)

a list

8.

What is the status after adding 10

a)
b)
c)
d)
9.

What is the status after adding 7

a)
b)
c)
d)
10.

Divide the item into equal-size pieces

Add the pieces together

Perform the mod step to get an address

Which hashing method does this describe

a)

folding method

b)

alphanumeric

c)

mid-square

d)

mod