text: After Sorting Maintain two variables i and j pointing to start and end of array Such that smallest element of array pairs with largest element
code: for ( $ i = 0 , $ j = $ N - 1 ; $ i <= $ j ; $ i ++ , $ j -- ) echo " ( " , $ arr [ $ i ] , " , ▁ " , $ arr [ $ j ] , " ) " , " ▁ " ; }