Given an unsorted array, rearrange the array such that number at the odd index is greater than the number at the previous even index. There may be multiple outputs, so your task is to complete the function and return the array.
First line consists of T test cases. First line of every test case consists of N, denoting number of elements in an array. Second line of every test case consists of elements in an array.
If Array is formed according to rules print 1, else 0.
5 4 3 2 1
4 3 2 1