Computer Science, asked by Mesha5809, 11 months ago

Use selection-sort to sort first k elements of a list in ascending order and the remaining n-k elements in descending order.

Answers

Answered by arpita8137
0

Arranging the array's elements from largest to smallest is termed as sorting the array in descending order. First, sort the array usingArray.Sort() method which sorts an array ascending order then, reverse it usingArray.Reverse() method. int [] arr = new int [] {1, 9, 6, 7, 5, 9}; // Sort array in ascending order.

Similar questions