auto commit

This commit is contained in:
CyC2018
2018-03-09 14:06:25 +08:00
parent 5f97efe72d
commit 68dd3b8d4b

View File

@ -68,7 +68,7 @@ public int search(int key, int[] array) {
} }
``` ```
实现时需要注意以下细节: 实现时需要注意以下细节:
1. 在计算 mid 时不能使用 mid = (l + h) / 2 这种方式,因为 l + h 可能会导致加法溢出,应该使用 mid = l + (h - l) / 2。 1. 在计算 mid 时不能使用 mid = (l + h) / 2 这种方式,因为 l + h 可能会导致加法溢出,应该使用 mid = l + (h - l) / 2。