{"id":5018,"date":"2024-10-02T14:01:01","date_gmt":"2024-10-02T06:01:01","guid":{"rendered":""},"modified":"2024-10-02T14:01:01","modified_gmt":"2024-10-02T06:01:01","slug":"\u4e09\u4e2a\u6570\u6392\u5e8f\u6307\u9488_\u70ed\u9898","status":"publish","type":"post","link":"https:\/\/mushiming.com\/5018.html","title":{"rendered":"\u4e09\u4e2a\u6570\u6392\u5e8f\u6307\u9488_\u70ed\u9898"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

1 \u9898\u76ee\u63cf\u8ff0<\/h3>\n

\u7ed9\u4f60\u4e00\u4e2a\u5305\u542b n \u4e2a\u6574\u6570\u7684\u6570\u7ec4 nums\uff0c\u5224\u65ad nums \u4e2d\u662f\u5426\u5b58\u5728\u4e09\u4e2a\u5143\u7d20 a\uff0cb\uff0cc \uff0c\u4f7f\u5f97 a + b + c = 0 \uff1f\u8bf7\u4f60\u627e\u51fa\u6240\u6709\u6ee1\u8db3\u6761\u4ef6\u4e14\u4e0d\u91cd\u590d\u7684\u4e09\u5143\u7ec4\u3002<\/p>\n

\u6ce8\u610f\uff1a\u7b54\u6848\u4e2d\u4e0d\u53ef\u4ee5\u5305\u542b\u91cd\u590d\u7684\u4e09\u5143\u7ec4\u3002<\/p>\n

\u793a\u4f8b\uff1a<\/p>\n

\u7ed9\u5b9a\u6570\u7ec4 nums = [-1, 0, 1, 2, -1, -4]\uff0c<\/p>\n

\u6ee1\u8db3\u8981\u6c42\u7684\u4e09\u5143\u7ec4\u96c6\u5408\u4e3a\uff1a
[
[-1, 0, 1],
[-1, -1, 2]
]<\/p>\n

\u6765\u6e90\uff1a\u529b\u6263\uff08LeetCode\uff09
\u94fe\u63a5\uff1ahttps:\/\/leetcode-cn.com\/problems\/3sum
\u8457\u4f5c\u6743\u5f52\u9886\u6263\u7f51\u7edc\u6240\u6709\u3002\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u8054\u7cfb\u5b98\u65b9\u6388\u6743\uff0c\u975e\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u3002<\/p>\n

2 \u89e3\u9898\u601d\u8def<\/h3>\n