Skip to content

tinazheng/CuckooMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CuckooMap

Python implementation of a Cuckoo HashMap

Some notes:

  • Sometimes, using cuckoo hashing, the set() function will turn into an infinite loop (as explained by the Wikipedia article). In order to resolve this, I chose to define a function that will detect if there are more than 2000 knockouts. Once this limit has reached, I will reject the setter. Rejection does not affect placements of other elements.
  • This is a fix-sized implementation of the hashmap. I chose to initialize it with 2x the number of buckets for reduced hash-collisions.
  • The load factor returns (float) current_size / max_size

About

Python implementation of a HashMap using cuckoo hashing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages