Given a non-empty array where every element appears twice except for one, find that single element.
You must implement a solution with O(n) time and O(1) space (excluding input).
Example: For [4,1,2,1,2], return 4.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Given a non-empty array where every element appears twice except for one, find that single element.
You must implement a solution with O(n) time and O(1) space (excluding input).
Example: For [4,1,2,1,2], return 4.