Given an array of integers, replace each element in the array with the greatest element present among its right side elements. For the very last element of the array, replace it with -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.