Is Hashtable type in C # implemented using chaining or public addressing?

If open addressing, how the probe sequence is generated. Pls gives links

+4
source share
2 answers

It uses open addressing (or, as we said, "closed hashing") with double hashing to generate a sequence of probe addresses. GetHashCode () defines the first index of the probe; interval is also a function of GHC ().

You can see it for yourself if you go to the source code of System.Collections.Hashtable.Add (), for example. [Http://referencesource.microsoft.com/].

Happy hack!

+4
source

Hashtable in the .net framework uses open addressing or the Double Hashing method, while the dictionary uses Chaining as a collision avoidance technique.

See this @MSDN link

+1
source

All Articles