Given an array, sort even numbers in descending order and odd numbers in ascending order, while maintaining their original indices (i.e., if index i had an even number, it must remain even after…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.