有一天醒来 我第一次注意到镜子里的人笑起来会有眼袋 你安慰我说,那是昨日疲惫的痕迹 有一天下午 我因为‘人生海海’一句歌词,振奋起来 ’我知道潮...
Solution: 此题是search inrotateed array 的变形, 多了 duplicate 的情况, 思路相同,但是必须加入d...
Solution: In a sorted rotated array, half of the elements must be in a s...
Solution1: Dynamic transfer function : dp(cur) = nums[i] + ( dp(prev) > ...
Tag: array, level : easy Solution: maintain two pointers, one iterate th...
Tag: array, level: easy Solution: Using two pointers, use first pointer ...
3 sum 的变形题 Solution1: sort first, then iterate the array, fix one elemen...
solution 1: sort the array, then fix two,using two pointers, one at the ...
Solution: Sort then using two pointers, one at the beginning element, on...