##
Sort all even numbers in ascending order and then sort all odd numbers in descending order
March 11, 2017

Given an array of integers (both odd and even), sort them in such a way that the first part of the array contains odd numbers sorted in descending order, rest portion contains even numbers sorted in ascending order. Examples: Input : arr[] = {1, 2, 3, 5, 4, 7, 10} Output : arr[] = {7,… Read More »