Company: Natwest_7aug
Difficulty: easy
Alternate Sorted Elements Problem Description The alternate sort of a list is made of the alternate elements of the list, starting from the first position, after the list has been sorted in ascending order. You are given a list of N unsorted integers. Sort the list in ascending order and return the elements at positions 0, 2, 4, ... of the sorted list, in that order. Input Format Read from standard input. N arr[0] arr[1] ... arr[N-1] Line 1 contains the integer N (called size in the original statement), the number of elements in the list. Line 2 contains the N elements, separated by single spaces. Output Format Print the elements of the alternate sort on a single line, separated by single spaces. Exactly ceil(N / 2) values are printed. Constraints 1 <= N <= 3000 . (inferred -- the source states size <= 10^6 ; the output grows with N , and at N = 3000 it already reaches 13500 bytes against this judge's 18000-byte output limit, so the bound is lowered.) -10^6 <= arr[i] <=