Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hashtables are shit

Name: Anonymous 2013-06-14 23:07

Why doesn't my hashtable work
also look i made somethign with C
http://pastebin.com/1a2kq4nF

Name: Anonymous 2013-06-14 23:26

Have a good hard look at this function and tell me where it's going wrong (besides the obnoxious code style).


int
_hashtable_hash
(
        char*   key
)
{
        int hash = 0;
        char c = key[0];
        while (c != '\0') {
                hash += (c * 1459 + 2593)%3457;
                c++;
        }
        return hash;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List