News for hackers. Stuff that matters.
Re:15-line hash table in C by balakc on Friday December 12, 2014 @09:44AM (#8740216)
Every time a lookup is performed, isn't it linearly looking through the table to find that key... That doesn't sound like a hash! Maybe am missing something here.
Re:15-line hash table in C by jfoutz on Friday December 12, 2014 @10:26AM (#8740501)
Instead of a linked list to store hash collisions, it's using linear probing, which just uses the next open spot in the table. (Maybe I'm misunderstanding the question, it looks like they're indexing into the table correctly to me)
Re:15-line hash table in C by crabhi on Friday December 12, 2014 @12:40PM (#8741501)
h seems to be the hash.

    h = k & (SIZE - 1)