Given an integer array `arr` where the difference between any two adjacent elements is at most 1, find the index of a given target element `x`. If multiple occurrences exist, returning any valid index…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.