跳过正文

Posts

2017

20140419

·1 分钟
最让你恶心痛苦的那些人,你必要从他们身上学到最重要和有用的东西。 所有的痛苦都不能白受,克我者必生我。

leetcode 228. Summary Ranges

·1 分钟
Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 题意:把连续的数连续表示

leetcode 11. Container With Most Water (two pointer)

·1 分钟
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.