Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kunigami
Created April 11, 2019 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/39af4ecd0c2af18187791b923a8ed021 to your computer and use it in GitHub Desktop.
Save kunigami/39af4ecd0c2af18187791b923a8ed021 to your computer and use it in GitHub Desktop.
pub struct ConsistentHashTable {
containers: rbtree::RBTree<u32, Entry>,
entries: HashSet<u32>,
// The hash function must have the property of mapping strings to
// the space of u32 numbers with uniform probability.
hash_function: fn (&String) -> u32
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment