Given an array of integers, write a function that returns a new array where all the odd numbers are sorted in ascending order and placed at the beginning, followed by all the even numbers sorted in descending order.
For example:
[3, 1, 4, 2, 5]
[1, 3, 5]
[4, 2]
[1, 3, 5, 4, 2]
Happy coding this January 8th!