摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2015-12-19 19:21 TonyYPZhang 阅读(4023) 评论(0) 推荐(0) 编辑
摘要: 问题:给定一个正整数数组和一个正整数 s ,求连续子数组的和大于等于 s 的最小长度。 解题思路:采用滑动窗口算法(Slide Window Algorithm)。 设下标 l 和 r, 把左开右闭 [l, r) 想象成一个窗口。 阅读全文
posted @ 2015-12-19 15:50 TonyYPZhang 阅读(791) 评论(0) 推荐(0) 编辑