Given an array of integers, rearrange the elements such that the first element is the maximum, the second element is the minimum, the third is the second maximum, the fourth is the second minimum, and…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.