PDA

View Full Version : collisions in a tree?


sunilkamadolli
Nov6-04, 02:39 PM
Hello there,
Is it possible to have collisions in a AVL tree? My teacher asked me to write a hashing and collision resolution algorithm using AVL tree....maybe she means that i should store the tree node in a hashed array or something...what do u guys think?

dduardo
Nov6-04, 03:44 PM
Are you trying to map multiple keys to a node in the tree? Is this tree being implemented using a heap? You might want to talk to the teacher to make sure you understand the assignment.

[edit] If the problem is mapping multiple keys to a node in a tree, instead of having the actual data stored at the node why don't you have a pointer to a linked list. This is the easy way to do it.