Amazon Interview Question

R2 1. An array is given where the adjacent elements differ exactly by 1 i.e absolute difference is 1. You are supposed to find the first occurance of a target element.