1) Given an array of numbers where each number has a duplicate except one, write a program to return the lone number.
Sigiloso
Solution 1 Use a bit map for all possible numbers. Initialize it with all 0. traverse the array and XOR the corresponding bit for each number. in the final bit map, the bit with 1 corresponds to the lone number. O(n) Solution 2 Sort the array, then traverse it. O(n log n), but less memory.