Given an array of distinct integers, rearrange the array into a zig-zag fashion such that the rearranged array looks like a <= b >= c <= d >= e. In other words, alternate elements should be smaller…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.