sort evenArr [ ] in ascending order sort oddArr [ ] in descending order
evenArr . Sort ( ) ; oddArr . Sort ( ) ; oddArr . Reverse ( ) ; i = 0 ; for ( int j = 0 ; j < evenArr . Count ; j ++ ) { arr [ i ++ ] = evenArr [ j ] ; } for ( int j = 0 ; j < oddArr . Count ; j ++ ) { arr [ i ++ ] = oddArr [ j ] ; } }