open addressing
Open addressing is a method used in hash tables to resolve collisions, which occur when two keys hash to the same index. Instead of using a separate data structure for collisions, open addressing finds the next available slot within the same array. This is done through various probing techniques, such as linear probing, quadratic probing, or double hashing.
In open addressing, when a collision happens, the algorithm checks subsequent slots in the array until it finds an empty one. This approach keeps all data within the original array, making it space-efficient. However, it can lead to clustering, where groups of filled slots can slow down search operations.