โ† Amazon questions

Find majority element in a sorted array in O(log n) time

Filed under Amazon

Given a sorted array of integers, determine if there exists a majority element (an element appearing strictly more than n/2 times) in O(log n) time, returning the element or -1 if absent.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.