-7
![Stack Overflow](http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png)
anyone how to sort array such like a[]={1,6,5,4,2,3}
In odd ascending and even in descending order like ={1,6,3,4,5,2}
Rules:
should not use built-in functions.
should not use collections arrayList,or any List...etc
should be done in few loops (real question asked to me is in one loop.)
recur...