โ† Oracle questions
CodingReported in a candidate post, Jul 2025

Search in a sorted array with some adjacent elements swapped

Filed under Oracle

A sorted array of distinct integers has had some adjacent pairs swapped, so each element is at most one position away from where it belongs. Find the index of a given element, or -1, in O(log n).

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 Oracle questions

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