THE EXERCISE OF THE GUYS GUYS HAS BEEN MOVED TO THE MENU "EXERCISE OF Teacher"

Sort array

Threads: For an array of n integers. Printed on 2 line arrays respectively arranged vertically rising and descending.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: two lines, line array is arranged on the increase, bottom line array is sorted by dimensional reduction. The numbers on the same line separated by spaces.
For example:

input:
3
4 -3 -2
output:
-3 -2 4
4 -2 -3

You are not logged in? Log in to Submit Now!

4 Comments

Add a Comment