One of my friend was asked this question in an interview -
Depending on the language you are using, it might have a built in way to do the array differences. PHP does http://ca3.php.net/array_diff