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.
Asked in the technical phone screen stage. Time and space complexity were discussed.
Implement single_non_duplicate(nums), accepting a sorted list of integers and returning the unique integer.
def single_non_duplicate(nums):