Driver Code
int main ( ) { int arr [ ] = { 12 , 3 , 5 , 6 , 7 , 17 } ; int K = 2 ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; memset ( dp , -1 , sizeof ( dp ) ) ; cout << minSumDifference ( arr , N - 1 , K , K , 0 , 0 ) ; return 0 ; }