Java Program to divide the array into N pairs such that maximum pair is minimized
import java . io . * ; import java . util . Arrays ; class GFG { static void findOptimalPairs ( int arr [ ] , int N ) { Arrays . sort ( arr ) ;