摘要: No. 22 Generate Parentheses (重点) Solution: DFS 直接代码: No. 23 Merge k Sorted Lists (HARD) No. 24 Swap Nodes in Pairs Solution: 方法一:Iteratively 方法二: Recu 阅读全文
posted @ 2019-06-04 14:53 ArthurH 阅读(163) 评论(0) 推荐(0) 编辑
摘要: No. 19 Remove Nth Node From End of List (重点) Solution: 关键点是如何定位至倒数第n个节点。如下办法: 先从head (pre in code) 开始走至前第n+1个节点item (cur in code),这样子pre跟curm就相差n,再让pr 阅读全文
posted @ 2019-06-04 12:12 ArthurH 阅读(95) 评论(0) 推荐(0) 编辑
摘要: No. 16 3Sum Closest (EASY PASS) Solution: Two Pointers No. 17 Letter Combinations of a Phone Number Solution: Recursion 从后往前 No. 18 4Sum Solution: 方法一 阅读全文
posted @ 2019-06-04 10:25 ArthurH 阅读(111) 评论(0) 推荐(0) 编辑