Given an array of integers, find the next smaller element for each element in the array. For any element that does not have a smaller element to its right, output a default value like -1.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.