Skip to content

Ayxan13/crobin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crobin

This is an implementation of a "string to int" hash table with Robin Hood hashing. It is kept ANSI C for simplicity.

Sample usage:

#include <stdio.h>
#include "robin_map.h"

int main() {
    robin_map map = rm_init();
    char* keys[] = {
        "hello", "world"
    };
    int sz = (int) sizeof keys / sizeof *keys;
    int i;

    for (i = 0; i != sz; ++i) rm_put(&map, keys[i], i);

    for (i = 0; i != sz; ++i) 
        printf("`%s` -> %d\n", keys[i], *rm_get(&map, keys[i]));
}

About

robin map implementation in ANSI C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published