Given a sorted array of distinct integers and a target value x, find the floor and ceiling of x in the array. The floor is the greatest element <= x (-1 if none exists), and ceiling is the smallest…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.