32 32 votes Given the following input $(4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199)$ and the hash function $x$ mod $10$, which of the following statements are true? $9679, 1989, 4199$ hash to the same value $1471, 6171$ hash to the same value All elements hash to the same value Each element hashes to a different value I only II only I and II only III or IV Data Structures gatecse-2004 data-structures hashing easy + – Kathleen 13.8k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Danishgupta commented Aug 16, 2022 reply Follow flag This is a little confusing if we used linear probing then the answer is having different value but as we see in answer the only IV is not present in this so the best choice is doing chaining 2 2 replyShare vxi lin commented Feb 4 reply Follow flag indeed it is I solved taking linear probing by default but since it is not mentioned explicitly which type c seems correct. 0 0 replyShare Please log in or register to add a comment.
Best answer 30 30 votes Option C is correct answer because the last digit of every digit given is equal in I and II. Bhagirathi answered Sep 22, 2014 • edited Jun 13, 2018 by Milicevic3306 Bhagirathi comment Share Follow 0 reply Please log in or register to add a comment.
14 14 votes This might Help to understand better BHAVESH d shah answered Jun 28, 2017 BHAVESH d shah comment Share Follow See all 2 Comments 2 2 Comments reply Hafiz bukhari commented Apr 17, 2020 reply Follow flag He has not mentioned which type of hashing should we use i mean if we use chaining then option c is correct if we will use linear hashing then they all will hash yo different values... Got confused little bit 1 1 replyShare bharatmnair246 commented Jul 27, 2020 reply Follow flag actually in this question it is not specified whether we have to use chaining or linear probing... 0 0 replyShare Please log in or register to add a comment.
5 5 votes Answer C we can simply get it by dividing the keys Rishi yadav answered Oct 13, 2017 Rishi yadav comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes https://youtu.be/msHdtBHHDJg rohittulasyan answered Oct 11, 2018 rohittulasyan comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes (I) 9679mod10 = 9 ,1989mod10 = 9, 4199mod10 = 9 ( Same value )(ii) 1471mod10 = 1 , 6171mod10 = 1 (Same value )(iii) Here ,clearly all elements having different value so not this option .(iv) Yes, Each Hashes having Different Values .OPTION (C.) For (i.) and (ii.) Only is correct Rahul_kumar3 answered Oct 19, 2023 • edited Oct 7, 2025 by Rahul_kumar3 Rahul_kumar3 comment Share Follow See 1 comment 1 1 comment reply vxi lin commented Oct 3, 2025 reply Follow flag It is a typo maybe, it should be OPTION (c) is the right option (i.) and (ii.) Only is correct 0 0 replyShare Please log in or register to add a comment.