← Amazon questions

Search element in array with adjacent elements differing by +1 or -1

Filed under Amazon

Search for a target value in an array where adjacent elements differ by exactly 1. Achieve better than O(n) time.

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.