Which of the following scenarios leads to linear running time for a random search hit in a linear-probing hash table? Data Structure

  • a) All keys hash to same index
  • b) All keys hash to different indices
  • c) All keys hash to an even-numbered index
  • d) All keys hash to different even-numbered indices
Answer: a) All keys hash to same index
1127 students attemted this question.


No Explanation Available.

Share this question with friends

Similar Questions

  1. Consider a hash table of size seven, with starting index zero, and a hash function (3x + 4)mod7. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Note that ‘_’ denotes an empty location in the table.

  2. A hash table can store a maximum of 10 records, currently there are records in location 1, 3,4,7,8,9,10. The probability of a new record going into location 2, with hash functions resolving collisions by linear probing is

  3. The hash function isH1(k) = k % 50.In the case of collision, the hash function used isH(k) = (H1(k) + M x H2(k)) % 50where H1(k) = k % 50 and H2(k) = k % 20.M is initialized to 0 and is incremented by 1 each time a collision occurs.This could be categorized under which of the following collision detection technique

  4. 1. What is a hash table?

  5. If several elements are competing for the same bucket in the hash table, what is it called?

  6. If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the expected number of collisions involving a particular key x is :

  7. Given a hash table T with 25 slots that stores 2000 elements, the load factor α for T is __________

  8. A hash table is

  9. Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?

  10. In this type of search, a sequential search is made over all items one by one.

  11. The worst case occurs in linear search algorithm when ______________________

  12. What is a hash function?

  13. Which of the following is useful in traversing a given graph by breadth first search?

  14. Which of the following data structure is non linear type?

  15. Which of the following data structure is linear type?

  16. Which one of the following is not a linear data structure

  17. Which of the following data structure is not a linear data structure

  18. Which of the following is not a linear data structure

  19. A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called

  20. Given a sequence of number below: 50,60,40,70,45,55,30,80,65,35,25,75,85When creating a binary search tree, what is the height of the tree?


Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.