How are hash collisions handled?

前端 未结 3 944
野的像风
野的像风 2021-01-18 08:03

I\'ve recently learned a little bit about hash values, and therefore also heard of about the problem of hash collisions.
I therefore wondered: How does one deal with tho

3条回答
  •  轮回少年
    2021-01-18 08:12

    Swift dictionaries uses open addressing and linear probing.

    Here is a link to the actual source documentation explaining everything: https://github.com/apple/swift/blob/master/stdlib/public/core/HashedCollections.swift.gyb

提交回复
热议问题