Skip to content

Instantly share code, notes, and snippets.

function solution(K, M, A) {
// M is a red herring
return minimalLargeSumBinarySearch(K, A);
}
function minimalLargeSumBinarySearch(maxNumBlocks, arra) {
var lowerBoundLargeSum = Math.max.apply(null, arra);
var upperBoundLargeSum = arra.reduce((a,c)=>a+c,0);
var result = -1;