I have to implement a hash table for my class, and the scenario I have to work with is so bad. We're storing a person object with two member variables, one is the someone's ID and the other is someone's favorite programming language. The person's ID is always unique. In any normal situation, we would be using the ID as the key. But since this is a computer science class, we have to use the person's favorite programming language as the key, which is BY DESIGN going to cause so many fucking hash collisions for no reason

Enter discipleship

Also, to search the hash table, you need to give both the favorite language and the ID, making it completely fucking useless for anything but verifying if something is or isn't in the table.

Sign in to participate in the conversation

A witchy space for most any face! Whether a witch or a witch-respecter, join the coven that is free of fash, TERFs, feds, and bigots