Back to problems

Find Unique Number in Consecutive Pairs

Algorithm · Snowflake · Medium

Locate the Single Element in a Sorted Array Medium · Topics · Company Tags · Hints You are given a sorted array of integers nums, where the elements are arranged in non-decreasing order. In this array, every value appears exactly twice, except for one solitary value that occurs only once. Your task is to return the index at which this unique value is located. The solution must use a binary‑search strategy and achieve $$O(\log n)$$ time complexity; a full linear scan is not…

Checking your access…