python_data_structures_and_algorithms
python_data_structures_and_algorithms copied to clipboard
Change _find_slot_for_insert()
通过统计循环次数,当超过哈希表大小时,动态扩展哈希表的大小。这可以有效减少冲突并避免哈希表的二次探测函数会出现无限循环