mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-26 10:07:13 +00:00
build
This commit is contained in:
@@ -6,9 +6,9 @@ comments: true
|
||||
|
||||
在算法题中,**我们常通过将线性查找替换为哈希查找来降低算法的时间复杂度**。我们借助一个算法题来加深理解。
|
||||
|
||||
!!! question "两数之和"
|
||||
!!! question
|
||||
|
||||
给定一个整数数组 `nums` 和一个整数目标值 `target` ,请在数组中搜索“和”为目标值 `target` 的两个整数,并返回他们在数组中的索引。注意,数组中同一个元素在答案里不能重复出现。返回任意一个解即可。
|
||||
给定一个整数数组 `nums` 和一个目标元素 `target` ,请在数组中搜索“和”为 `target` 的两个元素,并返回它们的数组索引。返回任意一个解即可。
|
||||
|
||||
## 10.3.1. 线性查找:以时间换空间
|
||||
|
||||
|
||||
Reference in New Issue
Block a user