mid1 and mid2 are representative array equal values of search space
$ mid1 = $ low + ( floor ( $ high - $ low ) / 3 ) ; $ mid2 = $ high - ( $ high - $ low ) / 3 ; $ cost1 = computeCost ( $ arr , $ N , $ mid1 ) ; $ cost2 = computeCost ( $ arr , $ N , $ mid2 ) ;