Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by layoutIfNeeded

6 years ago

Yep, also the insertion procedure is retried with increasingly larger arrays until no “collisions” are encountered.

Reminds me of minimal perfect hash construction.

1 comment

layoutIfNeeded

Reply

thomasmg  6 years ago

Yes, the underlying theory is from a minimal perfect hash function called "BDZ": http://cmph.sourceforge.net/bdz.html . Yes, sometimes a retry is needed, but the array is not made larger; it just retries with a different seed.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities