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