sir,,,using sorting we can not find the solution ????
i tried u just check once..
1) sort the array in ascending order..
2) find the mid point
loop
3)from end of array print element and then decrease the index till mid point
4) from the starting print one element and then increase the index till midpoint-1
5) goto loop
for example we have 1 2 3 4 5|||| 6 7 8 9 10
10 1 9 2 8 3 7 4 6 5
it will also work when elments are repeated
plz clarify...did i understood the question or not...