2 votes 2 votes Let $| U | = m^{2}$ and consider hashing with chaining. For any hash function $h : U\rightarrow{ 1, 2, ......., m-1}, $ there exists a sequence of $m$ insertions that leads to a chain of length $:$ $(A) m-1$ $(B) m$ ($C) m+1$ $(D)$ None. i got (m-2) max length .....option D Algorithms algorithms hashing virtual-gate-test-series + – Hradesh patel asked Oct 1, 2016 • retagged Jul 7, 2022 by Lakshman Bhaiya Hradesh patel 1.3k views answer comment Share Follow See 1 comment See all 1 1 comment reply mcjoshi commented Oct 1, 2016 reply Follow Share we are performing $m$ insertions here, so it can lead to a chain of length $m$. 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes The question is not assuming simple uniform hashing, so all keys might map to same location, hence chain could be of length m. So option b Seems correct vivek9837 answered Oct 2, 2016 vivek9837 comment Share Follow See 1 comment See all 1 1 comment reply Sushant Gokhale commented Oct 30, 2016 reply Follow Share @Vvek. But they havent said that this is initial sequence. They have said "there exists a sequence....." So, already there may be some elements on that slot. So, chain length is unpredictable, right? 0 votes 0 votes Please log in or register to add a comment.