Computers

University

Image

Practice Problems on Hashing

11
plays

7 questions

Show Answers
See Preview
  • 1. Multiple Choice
    3 minutes
    1 pt

    Insertion of keys into hash table using linear probing as collision resolution technique – In linear probing technique, collision is resolved by searching linearly in the hash table until an empty location is found. 

    The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table? 

    Image
    Image
    Image
    Image
  • 2. Open Ended
    3 minutes
    1 pt

    What is the complexity of finding order information, such as max, min or range from a hash table?

  • 3. Open Ended
    5 minutes
    1 pt

    Given the input {4371, 1323, 6173, 4199, 4344, 9679, 1989}, a fixed table size of 10, and a hash function H(X) = X mod 10, show the resulting

    a.       Linear probing hash table

    b.      Quadratic probing hash table

    c.       Separate chaining hash table

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?