# 15.三数之和

![image-20211229103459272](C:%5CUsers%5CAdnim%5CAppData%5CRoaming%5CTypora%5Ctypora-user-images%5Cimage-20211229103459272.png)「不重复」的本质是什么？我们保持三重循环的大框架不变，

1.不重复的话， 只需要保证：

第二重循环枚举到的元素不小于当前第一重循环枚举到的元素；

第三重循环枚举到的元素不小于当前第二重循环枚举到的元素。

那么肯定是需要进行一次排序


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qiangrens-organization.gitbook.io/qkd90/java-kai-fa/jian-zhi-offer-zhuan-xiang-tu-ji-ban/15.-san-shu-zhi-he.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
