workshops/hash_table/hashtable.py
def __check_available_index(self, index):
        '''
        Checks if there is empty slot on this index,
        if not implement the linear approach when there is a
        collision between two hash indexes and returns the next available index
        :param index: int
        :return: int -> next current available index
        '''
        if index == len(self.__keys):
            return self.__check_available_index(0)
        # Linear approach implementation
        if self.__keys[index] is None:
            return index
        # Try next index
        return self.__check_available_index(index + 1)

        Checks if there is empty slot on this index,
        if not implement the linear approach when there is a
        collision between two hash indexes and returns the next available index
        :param index: int
        :return: int -> next current available index
        
Checks if there is empty slot on this index,
if not implement the linear approach when there is a
collision between two hash indexes and returns the next available index
Checks if there is empty slot on this index if not implement the linear approach when there is a collision between two hash indexes and returns the next available index
def __check_available_index(self, index):
        if index == len(self.__keys):
            return self.__check_available_index(0)
        if self.__keys[index] is None:
            return index
        return self.__check_available_index(index + 1)
def __check_available_index ( self , index ) : if index == len ( self . __keys ) : return self . __check_available_index ( 0 ) if self . __keys [ index ] is None : return index return self . __check_available_index ( index + 1 )
Checks if there is empty slot on this index,
if not implement the linear approach when there is a
collision between two hash indexes and returns the next available index
Checks if there is empty slot on this index if not implement the linear approach when there is a collision between two hash indexes and returns the next available index
'''
        Checks if there is empty slot on this index,
        if not implement the linear approach when there is a
        collision between two hash indexes and returns the next available index
        :param index: int
        :return: int -> next current available index
        ''' # Linear approach implementation # Try next index
> next current available index
> next current available index
self
index
None