GATE CSE
First time here? Checkout the FAQ!
x
0 votes
55 views

Consider a hash table with chaining scheme for overflow handling:

  1. What is the worst-case timing complexity of inserting $n$ elements into such a table?
  2. For what type of instance does this hashing scheme take the worst-case time for insertion?
asked in Algorithms by Veteran (29.1k points)  
edited by | 55 views

1 Answer

0 votes
1.) The worst case can be O(n) if all the insertions collide at the same key.

2.) This happens when we are not using an uniformly distributed hash function or when our hash table has only a single key where all the elements are chained up.
answered by (359 points)  


Top Users Mar 2017
  1. rude

    4272 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2608 Points

  5. Debashish Deka

    2244 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1338 Points

  8. Akriti sood

    1246 Points

  9. Bikram

    1246 Points

  10. Sanjay Sharma

    1016 Points

Monthly Topper: Rs. 500 gift card

21,452 questions
26,771 answers
60,972 comments
22,985 users