title: Why do some codes in Binary Search set the middle pivot as 'left + (right - left) //2'?
body: <p>For example, basic binary search in Python:</p>
  <pre><code>left, right = 0, len(nums) - 1
  
  while left &lt;= right:
      # // 2 -&gt; floor
      pivot = left + (right - left) // 2
      if nums[pivot] == target:
          return pivot
      if target &lt; nums[pivot]:
          right = pivot - 1
      else:
          left = pivot + 1
  </code></pre>
  <p>In this code, pivot is <code>left + (right - left) // 2</code>, not <code>len(nums) // 2</code>.
  Could you explain why?</p>