Bookmark Topic Watch Topic
  • New Topic

Using Binary search trees to sort collision in hash function  RSS feed

 
Patty Lebowski
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is the original problem:

Given a hash function h(x) = x mod 3, insert entries with keys 13, 22, 8, 16, 33, 52, 43, 28, 45, 23, 11, 15, 9, 2, 20, 30, 19, 50 to the hash table. Use binary search trees to solve hash collision, where each cell of the hash table stores the root of a binary search tree.

I'm unsure if I have the correct answer to this Homework problem. If I'm wrong please direct me in the right direction.


|0  |1  |2 | 3 | 4|  5| 6 | 7 |8| 9 |10|11|12|13|14 |15|16|17|

|45|13|22|16|52|43|28|19|8|33|23|11|2 |20|50 |15|9|30|
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Report post to moderator
Don't ask the same question twice. Please continue all discussion here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!