← Amazon questions
CodingEasy to Medium

Find K's Closest Elements and Mountain Range Problem

Filed under Amazon

Solve two problems: 1) Find the K closest elements to a given value X in a sorted array. 2) Find the maximum altitude difference between two points in an array representing mountain heights such that…

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.