0 votes 0 votes A hash function $f$ defined as $f (key) = key \mod 13$, with linear probing is used to insert keys 55, 58, 68, 91, 27, 145. What will be the location of 79? 1 2 3 4 DS ugcnetcse-dec2012-paper2 data-structures hashing + – go_editor asked Jul 10, 2016 edited May 30, 2020 by soujanyareddy13 go_editor 8.0k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments shekhar chauhan commented Jul 10, 2016 reply Follow Share with hash function you can calculate only location of keys in table .but what is table size ? and how would you consider 79 either this way 55, 58, 68,79, 91, 27, 145 or this way 55, 58, 68,91, 27, 145 ,79 both have different answer. 0 votes 0 votes LeenSharma commented Jul 10, 2016 reply Follow Share hehehe..Yes right without inserting element 79 he is asking location of it. 0 votes 0 votes Adarsh Mishra commented Sep 6, 2016 reply Follow Share ans will be 5.beacause when we perform linear probing then as 79 has to be inserted at 1 but this position is already occupied so we go in linear fashion and at 5 position we found an empty space there we can insert it 0 votes 0 votes Please log in or register to add a comment.
Best answer 5 votes 5 votes Answer: location for key 79 (assuming it is inserted at end) is not available in option. Key Location 55 3 58 6 68 4 91 0 27 1 145 2 79 5(Answer) G18 answered Jul 10, 2016 selected Jul 10, 2016 by Arjun G18 comment Share Follow See all 14 Comments See all 14 14 Comments reply Show 11 previous comments Arjun commented Jul 10, 2016 reply Follow Share Yes, the question missed telling that 79 is inserted. But it is reasonable to assume that it will be at end as the sequence of all other insertions are given. Of course they would have wanted to give 79 among the numbers being inserted- just missed that. 1 votes 1 votes LeenSharma commented Jul 10, 2016 reply Follow Share if we take sequence 55, 58, 68, 91, 27, 145,79 then answer should be 5 which is not in option. 1 votes 1 votes Arjun commented Jul 10, 2016 reply Follow Share yes. So this question was removed from evaluation. 2 votes 2 votes Please log in or register to add a comment.