Update the callouts for the algorithm problems.

This commit is contained in:
krahets
2023-05-21 19:58:21 +08:00
parent d95c628eef
commit 24d90931e3
8 changed files with 29 additions and 37 deletions
+3 -1
View File
@@ -4,7 +4,9 @@
我们先来求解一个简单的二分查找问题。
!!! question "给定一个长度为 $n$ 的有序数组 `nums` ,元素按从小到大的顺序排列。查找并返回元素 `target` 在该数组中的索引。若数组中不包含该元素,则返回 $-1$ 。数组中不包含重复元素。"
!!! question
给定一个长度为 $n$ 的有序数组 `nums` ,元素按从小到大的顺序排列。请查找并返回元素 `target` 在该数组中的索引。若数组中不包含该元素,则返回 $-1$ 。数组中不包含重复元素。
该数组的索引范围可以使用区间 $[0, n - 1]$ 来表示。其中,**中括号表示“闭区间”,即包含边界值本身**。在该表示下,区间 $[i, j]$ 在 $i = j$ 时仍包含一个元素,在 $i > j$ 时为空区间。