Given an array of integers, construct an output array where each position contains the first element to its right that is greater than itself, or -1 if none exists.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.