text: CPP Program to divide the array into N pairs such that maximum pair is minimized
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; void findOptimalPairs ( int arr [ ] , int N ) { sort ( arr , arr + N ) ;