Java program to count minimum number of partitions of size 2 and sum smaller than or equal to given key .
import java . util . Arrays ; class GFG { static int minimumSets ( int arr [ ] , int n , int key ) { int i , j ;