title: How to implement hash table with chaining?
body: <p>This is probably a stupid question but, I cant for the love of god figure out what I'm missing here in the theory behind hash tables with chaining.</p>
  
  <p>This is what I understand:</p>
  
  <p>A hash table uses a hash to associate a key to a location where a value is stored. Sometimes a hash will produce the same location for different keys, ie collisions may occur. </p>
  
  <p>In this case we can implement chaining by storing all values with the same location to a linked list at that location.</p>
  
  <p>What I don't understand is this:</p>
  
  <p>When you enter a key and the hash function produces a location at which there is chaining, how does it determine which value in the linked list at that location belongs to that specific key, as opposed to another key involved in the collision?</p>
  
  <p>I realize this is basic theory, but if anyone could point out errors in my reasoning or tell me what I'm missing I would very much appreciate it.</p>