21. Hashing - 9 Questions


21. Hashing

21. Hashing

9 Questions
Created by Y. Daniel Liang - http://www.cs.armstrong.edu/liang/index.html
Free
This Python quiz is aimed at students, enthusiasts and job seekers with little or no programming experience. It aims to provide them with an understanding of the role of computers and python programming language.
  1. A hashing function __________.



    stores an element in the hash table
    stores an element in a set
    stores an element in a list
    maps a key to an index in the hash table

    View Answer | Discuss in forum
  2. If each key is mapped to a different index in the hash table, it is called _______.



    normal hashing
    abnormal hashing
    perfect hashing
    critical hashing

    View Answer | Discuss in forum
  3. A collision occurs _____________.



    when two or more keys are mapped to the same hash value.
    when two elements have the same key value.
    when two elements are mapped to the same key.
    none of these

    View Answer | Discuss in forum
  4. Two objects have the same hash Codes if they are equal.



    True
    False
    Can't Say
    None of these

    View Answer | Discuss in forum
  5. If two strings are equal, the two strings have the same hash Codes.



    True
    False
    Can't say
    None of these

    View Answer | Discuss in forum
  6. _____________ is to find an open location in the hash table in the event of collision.



    Open addressing
    Separate chaining
    Closed addressing
    Consistent addressing

    View Answer | Discuss in forum
  7. When a collision occurs during the insertion of an entry to a hash table, ______ finds the next available location sequentially.



    linear probing
    quadratic probing
    single hashing
    double hashing.

    View Answer | Discuss in forum
  8. The __________ places all entries with the same hash index into the same location, rather than finding new locations.



    Open addressing scheme
    separate chaining scheme
    Closed addressing scheme
    None of these

    View Answer | Discuss in forum
  9. _______ measures how full the hash table is. 



    Threshold
    Depth factior
    Load factor
    None of these

    View Answer | Discuss in forum