News for hackers. Stuff that matters.
Re:XOR Swap - Stack Overflow for Tech Interview Questions by sirclueless on Monday March 21, 2011 @02:01PM (#2350839)
This site severely needs a way to rate other people's answers or something. Even just to comment on them. Otherwise it's just silly.

Case in point: http://xorswap.com/questions/85-what-is-a-hash-table-how-wou...

No offense to ankur, but his hash function is the silliest hash function ever. It looks intelligent and reasonable and is the kind of answer I would trust if I didn't know better. But what kind of hash function is injective? If I wanted to store arbitrary doubles into his hash table I would need a zettabyte (that is a billion terabytes) of memory. Ooops. I should be able to warn people about that somehow.

Re:XOR Swap - Stack Overflow for Tech Interview Questions by ndunn2 on Monday March 21, 2011 @11:08PM (#2352904)
Someone named Alex posted a good rebuttal to the hash function example. Very nice explanation of how hash tables work.