title: Distinguishing extra element from two arrays?
body: <p>One of my friend was asked this question in an interview -</p>
  
  <ul>
  <li>You have given two integer arrays each of size 10. </li>
  <li>Both contains 9 equal elements (say 1 to 9)</li>
  <li>Only one element is different.</li>
  </ul>
  
  <p>How will you find the different element? What are different approaches you can take?</p>
  
  <blockquote>
    <p>One simple but lengthy approach would be - sort both arrays,go on comparing each element,on false comparison, you'll get your result. </p>
  </blockquote>
  
  <p>So what are different approaches for this? Specify logic as its expected in an interview. Not expecting a particular code in a specific language. Pseudo code will suffice.</p>
  
  <p>(Please submit one approach per answer)</p>
  
  <blockquote>
    <p>My purpose of asking this question is, its OK when array sizes are small.But when array size increases, you must think of a very efficient n faster way.Its never desirable to use comparisons in such case.</p>
  </blockquote>