title: Set union algorithm using vector in C++
body: <p>I'm only using <code>std::vector</code> in this problem, and I can guarantee no duplicates in each vector (but there isn't any order in each vector). How do I union the vectors I have?</p>
  
  <p>Example:</p>
  
  <p>If I have following vectors...</p>
  
  <pre><code>1
  1
  3 2
  5
  5 4
  2
  4
  4 2
  </code></pre>
  
  <p>After the union I should have only two vectors left:</p>
  
  <pre><code>1
  2 3 4 5
  </code></pre>
  
  <p>Again I'm only using vector, <code>std::set</code> isn't allowed.</p>