What is primary and secondary clustering in hash?

前端 未结 2 1294
无人共我
无人共我 2021-01-30 11:25

I am confused for the last few days in finding the difference between primary and secondary clustering in hash collision management topic in the textbook I am reading.

2条回答
  •  无人及你
    2021-01-30 11:56

    Primary clustering means that if there is a cluster and the initial position of a new record would fall anywhere in the cluster the cluster size increases. Linear probing leads to this type of clustering.

    Secondary clustering is less severe, two records do only have the same collision chain if their initial position is the same. For example quadratic probing leads to this type of clustering.

提交回复
热议问题