Binary Search based approach in Python
\nclass Solution(object):\n    def singleNonDuplicate(self, list):\n        low, high = 0 , len(list)-1\n        while (low<high):\n            mid = low + (hig
```\nclass Solution(object):\n    def singleNonDuplicate(self, list):\n        low, high = 0 , len(list)-1\n        while (low<high):\n            mid = low + (high-low)/2\n            if (list[mid]!=list[mid+1] and list[mid]!=list[mid-1]):\n                return list[mid]\n            elif (mid%2 ==1 and list[mid]==list[mid-1]):\n                low = mid+1\n            elif (mid%2 ==0 and list[mid]==list[mid+1]):\n                low = mid+1\n            else:\n                high = mid-1\n        return list[low]\n```
[]