摘要:
https://leetcode.com/articles/trapping-rain-water/ 做完了一道hard难度的题目,个人还是很激动的,突然那觉得“双指针”简直就是神器,题目要求整个容器能盛下的水的数量,直观上来看,只有凹槽部分才能盛水,暴力搜索法复杂度太高,最佳方法是使用双指针,左右 阅读全文
posted @ 2018-03-14 12:14
皇家大鹏鹏
阅读(139)
评论(0)
推荐(0)
摘要:
Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2018-03-14 11:03
皇家大鹏鹏
阅读(144)
评论(0)
推荐(0)

浙公网安备 33010602011771号