Consider an array of n integer with all numbers are repeated once except one number.
Example: array of size 7 as {1,5,10,5,2,1,10}, here that specific number is 2 which is not repeated.
What is the time complexity to find that number from array with constant space complexity?
- A\(O(n)\)
- B\(O(1)\)
- C\(O(n^2)\)
- D\(O(\log n)\)