Leetcode 16-18

No. 16 3Sum Closest (EASY PASS)

Solution: Two Pointers


No. 17 Letter Combinations of a Phone Number

 

 Solution: Recursion 从后往前


No. 18 4Sum

Solution:

方法一:跟2Sum题目一样,构建Hash Tale,将两个数字相加成为key,value存储两个数字的index(以tuple形式(i, j))。

 

posted @ 2019-06-04 10:25  ArthurH  阅读(111)  评论(0编辑  收藏  举报