title: c++ - unordered_map complexity
body: <p>I need to create a lookup function where a (X,Y) pair corresponds to a specific Z value.  One major requirement for this is that I need to do it in as close to O(1) complexity as I can.  My plan is to use an unordered_map.</p>
  
  <p>I generally do not use a hash table for lookup, as the lookup time has never been important to me.  Am I correct in thinking that as long as I built the unordered_map with no collisions, my lookup time will be O(1)?</p>
  
  <p>My concern then is what the complexity becomes if there the key is not present in the unordered map.  If I use unordered_map::find():, for example, to determine whether a key is present in my hash table, how will it go about giving me an answer?  Does it actually iterate over all the keys?</p>
  
  <p>I greatly appreciate the help.</p>