left
and right
to -1.left
.right
.left
boundary to the left until the minimum value is greater than the array element at left - 1
.right
boundary to the right until the maximum value is less than the array element at right + 1
.right - left + 1
.