This commit is contained in:
programmercarl
2022-07-22 10:39:46 +08:00
parent 8292f4a9b8
commit 1b4422d438
3 changed files with 202 additions and 1 deletions

View File

@@ -37,6 +37,8 @@
# 思路
本题视频讲解:[学透哈希表map使用有技巧LeetCode454.四数相加II](https://www.bilibili.com/video/BV1Md4y1Q7Yh),结合视频在看本题解,事半功倍。
本题咋眼一看好像和[0015.三数之和](https://programmercarl.com/0015.三数之和.html)[0018.四数之和](https://programmercarl.com/0018.四数之和.html)差不多,其实差很多。
**本题是使用哈希法的经典题目,而[0015.三数之和](https://programmercarl.com/0015.三数之和.html)[0018.四数之和](https://programmercarl.com/0018.四数之和.html)并不合适使用哈希法**,因为三数之和和四数之和这两道题目使用哈希法在不超时的情况下做到对结果去重是很困难的,很有多细节需要处理。