javascript implementation to find the minimum cost to make all array elements equal
function lowerBound ( array , length , value ) { var low = 0 ; var high = length ; while ( low < high ) { var mid = parseInt ( ( low + high ) / 2 ) ;