Function to find minimum possible sum of pair which breaks the array into 3 non - empty subarrays
function minSumPair ( arr , N ) { if ( N < 5 ) { return - 1 ; } let prefixMin = new Array ( N ) . fill ( 0 ) ; prefixMin [ 0 ] = arr [ 0 ] ;