0
点赞
收藏
分享

微信扫一扫

leetcode-15-3Sum

春意暖洋洋 2023-08-23 阅读 28


Block me too much time, it is use two pointer to do. First is fix one numbers, then use two pointer to scan the remain sorted list and get the result. The time complexity is O(n^2). Just remember to deal with duplicate number

Update: remember, do not optimize the left and right if target != nums[left] + nums[right]


举报

相关推荐

0 条评论