AVL Tree Collisions: Is it Possible?

  • Thread starter Thread starter sunilkamadolli
  • Start date Start date
  • Tags Tags
    Collisions Tree
AI Thread Summary
Collisions in an AVL tree are not typical, as AVL trees are designed for balanced binary search operations. The discussion suggests that the assignment may involve storing tree nodes in a hashed array, prompting clarification from the teacher. If the goal is to map multiple keys to a single node, using a pointer to a linked list at the node could be a practical solution. This approach simplifies handling multiple keys without compromising the tree's structure. Clear communication with the teacher is recommended to ensure the assignment's requirements are fully understood.
sunilkamadolli
Messages
41
Reaction score
0
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?
 
Computer science news on Phys.org
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.
 
Last edited:
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top