Question

a. Suppose you are given the following set of keys to insert into a hash table...

a. Suppose you are given the following set of keys to insert into a hash table that holds exactly 11 values: 113 , 117 , 97 , 100 , 114 , 123 , 116 , 98 , 99 using the hash function   h(item) = item%11 Fill in the following hash table Reference: URL in the Hash tables item 113 is provided since 113%11 = 3

0

1

2

3

4

5

6

7

8

9

10

Hash(item)

113

item

b. Since the hash table holds exactly 11 values and there are only 9 keys, which two key values are not used ?

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
a. Suppose you are given the following set of keys to insert into a hash table...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Insert the following keys into the following hash table, size 10: a. our hash function is...

    Insert the following keys into the following hash table, size 10: a. our hash function is simply key mod 10 b. Assume open hashing Keys: 566 909 212 655 123 444 974 321

  • 5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and...

    5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and the hash function h(x) = x mod 5. i. (1) Pick 8 random numbers in the range of 10 to 99 and write the numbers in the picked sequence. Marks will only be given for proper random numbers (e.g., 11, 12, 13, 14 ... or 10, 20, 30, 40, .. are not acceptable random sequences). ii. (2) Draw a sketch of the hash table...

  • Tree & Hash Table & Heap Use the following integer keys 73, 58, 91, 42, 60,...

    Tree & Hash Table & Heap Use the following integer keys 73, 58, 91, 42, 60, 130, 64, 87 to perform the followings: a) Binary Search Tree - Draw a binary search tree - Retrieve the integers keys in post-order - Retrieve the integers keys in pre-order - Draw a binary search tree after node 58 is deleted b) Create a Hash Table using the methods described below. Show the final array after all integer keys are inserted. Assumes that...

  • in java, Hash 8 randomly generated int values (in the range [ 0 - 99 ]...

    in java, Hash 8 randomly generated int values (in the range [ 0 - 99 ] inclusive). The random number generator is initially seeded to value 97. Each generated value is stored in a hash table size 11. The first hash function, h1(key) is the division modulo sizeof(table). I.e., h1(key) = key % sizeof(table) h1(key) = key % 11. Any collisions will NOT be stored in the hash table. You will ignore collisions. The hash table is a random access...

  • Insert elements into a hash table implemented using chain hashing, as an array of linked list...

    Insert elements into a hash table implemented using chain hashing, as an array of linked list in which each entry slot is as a linked list of key/value pairings that have the same hash (outcome value computed using certain hash function). You are allowed to use “Hash Function”, h(k) = k % x where, x is the value you will need to decide to use, that you find appropriate for this implementation. The main requirements are the following: 1. Input:...

  • 1. Suppose that a hash table contains hash_size = 13 entries indexed from 0 through 12...

    1. Suppose that a hash table contains hash_size = 13 entries indexed from 0 through 12 and that the following keys are to be mapped into the table: 24    34    33    55    46    38    37 The hash function determines the hash address by first summing all digits of a key (in ordinary decimal representation) and then applying % hash_size.    Answer the following questions. Assume that double hashing g(k) = 7 – (k mod 7) is used. Present the hash table...

  • design hash table Suppose you need to design a hash table. The keys themselves are (pointers...

    design hash table Suppose you need to design a hash table. The keys themselves are (pointers to) C-style zero-terminating strings, so the string "foobar" occupies seven bytes. You are interested in minimizing the space used while keeping search time within reasonable bounds. You expect to store 1000 names with (on average) 7 letters each. If, for example, you choose separate chaining with 2000 buckets, the space required will be 24000 bytes: 8000 = (2000 buckets times 4 bytes per bucket...

  • C++ assignment - Hash table with linear probing --- implement in single file - main.cpp You...

    C++ assignment - Hash table with linear probing --- implement in single file - main.cpp You are asked to implement a very specific hash table. The keys are lower-case English words (e.g., apple, pear). The length of a key is at most 10. The hash function is “simply using the last character”. That is, the hash value of apple should be e, and the hash value of pear should be r. Your hash table contains exactly 26 slots (hash value...

  • C programming Problem 3 [Set via Hashing] As mentioned in the lecture, a hash table can...

    C programming Problem 3 [Set via Hashing] As mentioned in the lecture, a hash table can be used to implement a Set ADT. Let's try to use the template below to implement a Set with double hashing. Here we assume the Set contains names with 3 characters long. Since it is a Set, we do not need to have an explicit value for each key. We will use a token value of 1 if a name belongs to the Set....

  • 4. Hashing and Hash Tables. You need to use the ASCII table in the last page for this question. Study the following hash functions for ASCII C strings that are at least 3-char long unsigned hash1(con...

    4. Hashing and Hash Tables. You need to use the ASCII table in the last page for this question. Study the following hash functions for ASCII C strings that are at least 3-char long unsigned hash1(const char, unsigned unsigned vto]+01997 return (v % m); unsigned hash2Cconst char unsigned) unsigned v-o]k(2] 877 return 1 + (v % ( -1)); (a) Given that m-, 7, compute the hash values and fill the following table (3%) String k hash1k, ) hash2(k, 7) aph...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT