We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 193374f commit 865cc7eCopy full SHA for 865cc7e
note/016/README.md
@@ -15,7 +15,7 @@ Given an array *S* of *n* integers, find three integers in *S* such that the sum
15
16
## 思路
17
18
-这道题和 [3Sum][015] 的思路基本一样,先对数组进行排序,然后遍历这个排序数组,用两个指针分别指向当前元素的下一个和数组尾部,判断三者的和与 `target` 的差值来移动两个指针,并更新其结果,当然,如果三者的和直接与 `target` 值相同,那么返回 `target` 结果即可。
+题意是让你从数组中找出最接近 `target` 的三个数的和,该题和 [3Sum][015] 的思路基本一样,先对数组进行排序,然后遍历这个排序数组,用两个指针分别指向当前元素的下一个和数组尾部,判断三者的和与 `target` 的差值来移动两个指针,并更新其结果,当然,如果三者的和直接与 `target` 值相同,那么返回 `target` 结果即可。
19
20
```java
21
public class Solution {
0 commit comments