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

View File

@@ -2,9 +2,9 @@
在算法题中,**我们常通过将线性查找替换为哈希查找来降低算法的时间复杂度**。我们借助一个算法题来加深理解。
!!! question "两数之和"
!!! question
给定一个整数数组 `nums` 和一个整数目标值 `target` ,请在数组中搜索“和”为目标值 `target` 的两个整数,并返回他们在数组中的索引。注意,数组中同一个元素在答案里不能重复出现。返回任意一个解即可。
给定一个整数数组 `nums` 和一个目标元素 `target` ,请在数组中搜索“和”为 `target` 的两个元素,并返回它们的数组索引。返回任意一个解即可。
## 线性查找:以时间换空间