摘要: The idea is to find the longest palindromic substring ofsthat begins withs[0]. Then take the remaining susbtring, reverse it and append it to the begi... 阅读全文
posted @ 2015-06-11 01:28 jianchao-li 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Well, this problem has a O(n^3) solution similar to 3Sum. That is, fix two elements nums[i] and nums[j] (i > fourSum(vector& nums, int target) { 2 ... 阅读全文
posted @ 2015-06-11 00:19 jianchao-li 阅读(442) 评论(1) 推荐(0) 编辑