Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 190 Bytes

binary_search.md

File metadata and controls

11 lines (6 loc) · 190 Bytes

二分查找算法

⚠️注意点

一、

在计算 min 时,要小心溢出。

错误点演示❌ int mid = (low + high) / 2

正确点演示👍 int mid = low + (high - low) / 2