How to find non-identical numbers in a given two List in C++ & write program ( with syntax)
Interview Answers
Anonymous
Feb 13, 2012
sort two list first,maybe use quicksort, then merge
Anonymous
Feb 16, 2012
Hash table, use all numbers in first list ask keys with a common initial value say 1, then do a individual look-up for each number in the second list, if no such key was found then this number is non-identical, if found key, then increase value to 2, finally, go through all keys in the hash table and check their value, all the keys with value 1 are non-identical, should be a O(n) algorithm