摘要: This problem is very similar to 3Sum. You only need to maintain a variable for the sum that is closet to target. Also, some corner cases need to be ha... 阅读全文
posted @ 2015-06-10 22:57 jianchao-li 阅读(188) 评论(0) 推荐(0) 编辑
摘要: This is an extension of the 2Sum problem. The idea is pretty simple (even no need to use hash). Sort the array and then starting from the first elemen... 阅读全文
posted @ 2015-06-10 17:49 jianchao-li 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Well, it seems that many people meet the TLE problem. Well, I use a simple trick in my code to aoivd TLE. That is, each time before I try to breaks, I... 阅读全文
posted @ 2015-06-10 09:39 jianchao-li 阅读(313) 评论(0) 推荐(0) 编辑