← Amazon questions

Find the nearest smaller numbers on left side in an array

Filed under Amazon

Given an array of integers, find the nearest smaller element to the left of every element. If no such element exists, output -1 for that 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.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.