I. A large array of integer values is given. All values appear twice except one which appears once. How to find this value using at most O(1) additional variables and browsing through the entire array at most O(1) times.
II. Same, except now exactly two values appear once.