# Suppose that a computer has only the memory locations 0,1,2,...,19.  Use the hashing functionh where h(x)=(x+5) mod 20 to determine the memory locations in which 57, 32, and 97 are stored.

Question
6 views

Suppose that a computer has only the memory locations 0,1,2,...,19.  Use the hashing functionh where h(x)=(x+5) mod 20 to determine the memory locations in which 57, 32, and 97 are stored.

check_circle

star
star
star
star
star
1 Rating
Step 1

Memory location using hash function

A hash function is a function that takes one number as input and the other as output. The output is used as an index into the storage location which is similar to an array. Here the hash function is h(x) = (x + 5) mod 20

The first value to be stored in memory is 57. The hash value of 57 is

h (57) = (57 + 5) mod 20 = 62 mod 20 = 2.

Here ...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in 