Varun-Sethu / Hashtable

Implementation of a hashtable in golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hashtable

Simple hashtable implementation in golang just for fun, two methods of resolving collisions. The hashtable implements a universal class of hash functions in order to map data from the universal set to the table. More details at: https://www.cs.princeton.edu/courses/archive/fall09/cos521/Handouts/universalclasses.pdf

  • Chaining
  • Linear probing

Usage

Just include the package, but honestly don't ever use this... just use map

func main() {
    table := NewChainedTable(size)
    table.Insert(3, 2)

    table := NewProbedHashTable(size)
    table.Insert(3, 2)
}

About

Implementation of a hashtable in golang


Languages

Language:Go 100.0%