asked 24.2k views
1 vote
2 ways of dealing with collisions when hashing

asked
User RomualdM
by
8.6k points

1 Answer

3 votes

Final answer:

The question appears to confuse the concept of collisions in hashing (computer science) with physical collisions (physics). In hashing, collisions are handled with methods such as chaining and open addressing, while in physics, the focus is on conserving momentum and energy in a collision without rotation, handling objects as point masses.

Step-by-step explanation:

When dealing with collisions in hashing, which seems to be a miscommunication, as collisions in hashing refer to computer science whereas the description provided pertains to physics, there are two common methods used:

Chaining: This involves creating a linked list for each position in the hash table. When a collision occurs, the new item is simply added to the list at the hashed index.Open Addressing: In this method, when a collision occurs, a new position within the hash table is found using a process called probing, which could be linear, quadratic, or double hashing.

While these are strategies for handling hashing in computer science, the discussion here seems to mistakenly involve physical collisions. In physics, particularly in the case of two-dimensional collisions in billiards or pool, the focus would be on conserving momentum and energy without considering the rotation of objects, treating them as point masses to simplify the problem.

answered
User Warunapww
by
8.5k points