Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once.
Return the single element that appears only once.
Your solution must run in O(log n) time and O(1) space.
 
Please complete the following python code precisely:
```python
class Solution:
    def singleNonDuplicate(self, nums: List[int]) -> int:
```