Your question is Find Duplicate in Sorted Array. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a sorted array of integers nums where every value appears exactly twice except for one value that appears once, return the value that appears only once. The function should take a list of integers and return a single integer. Solve it in O(log n) time.
def single_non_duplicate(nums):