Compare adjacent numbers, skipping every other one. Since there's only one non-duplicate, we can return at the first instance of non-match. Assuming there's always a non-duplicate, we'll end up on the last element of the list eventually. If we get that far, its our non-duplicate.
def singleNonDuplicate(self, nums):
:type nums: List[int]
current = 0
if current == len(nums) - 1 or nums[current] != nums[current + 1]:
current += 2