title: Unordered_set questions
body: <p>Could anyone explain how an unordered set works? I am also not sure how a set works. My main question is what is the efficiency of its find function.</p>
  
  <p>For example, what is the total big O run time of this?</p>
  
  <pre><code>    vector&lt;int&gt; theFirst;
      vector&lt;int&gt; theSecond;
      vector&lt;int&gt; theMatch;
  
      theFirst.push_back( -2147483648 );
      theFirst.push_back(2);
      theFirst.push_back(44);
  
  
      theSecond.push_back(2);
      theSecond.push_back( -2147483648 );
      theSecond.push_back( 33 );
  
  
      //1) Place the contents into a unordered set that is O(m). 
      //2) O(n) look up so thats O(m + n). 
      //3) Add them to third structure so that's O(t)
      //4) All together it becomes O(m + n + t)
      unordered_set&lt;int&gt; theUnorderedSet(theFirst.begin(), theFirst.end());
  
      for(int i = 0; i &lt; theSecond.size(); i++) 
      {
          if(theUnorderedSet.find(theSecond[i]) != theUnorderedSet.end()) 
          {
          theMatch.push_back( theSecond[i] );
          cout &lt;&lt; theSecond[i];
          }
     }
  </code></pre>