Driver code to test above methods
int main ( ) { int arr [ ] = { 2 , 1 , 4 , 5 , 3 , 3 } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int K = 3 ; if ( isKPartitionPossible ( arr , N , K ) ) cout << " Partitions ▁ into ▁ equal ▁ sum ▁ is ▁ possible . STRNEWLINE " ; else cout << " Partitions ▁ into ▁ equal ▁ sum ▁ is ▁ not ▁ possible . STRNEWLINE " ; }