title: Fastest way to find an unique elements out of given numbers
body: <p>I have n numbers. n &lt;= 1000000. Each number will be positive integer and less than 10^9.</p>
  
  <p>It is sure that there will be only one number will occur once, rest will occur twice or even number of times.</p>
  
  <p>The shortest solution I know is the result of XOR of all numbers. I want to know </p>
  
  <ul>
  <li>What will be the complexity of the standard XOR solution.</li>
  <li>How can we optimize the solution.</li>
  </ul>