− | <code>mid</code> 赋值为 <code>floor(left + right) / 2</code> 时,需要用 <code>left = mid + 1</code> 和 <code>right = mid</code>,循环判断为 <code>left < right</code> <ref>https://github.com/CyC2018/CS-Notes/blob/master/notes/Leetcode%20%E9%A2%98%E8%A7%A3%20-%20%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE.md</ref> | + | <code>mid</code> 赋值为 <code>floor((left + right) / 2)</code> 时,需要用 <code>left = mid + 1</code> 和 <code>right = mid</code>,循环判断为 <code>left < right</code> <ref>https://github.com/CyC2018/CS-Notes/blob/master/notes/Leetcode%20%E9%A2%98%E8%A7%A3%20-%20%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE.md</ref> |