mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-12 11:50:58 +00:00
finetune
This commit is contained in:
@@ -115,9 +115,9 @@
|
||||
[class]{}-[func]{binary_search}
|
||||
```
|
||||
|
||||
时间复杂度为 $O(\log n)$ 。每轮缩小一半区间,因此二分循环次数为 $\log_2 n$ 。
|
||||
**时间复杂度 $O(\log n)$** :在二分循环中,区间每轮缩小一半,循环次数为 $\log_2 n$ 。
|
||||
|
||||
空间复杂度为 $O(1)$ 。指针 $i$ 和 $j$ 使用常数大小空间。
|
||||
**空间复杂度 $O(1)$** :指针 $i$ 和 $j$ 使用常数大小空间。
|
||||
|
||||
## 区间表示方法
|
||||
|
||||
|
||||
Reference in New Issue
Block a user