Skip to main content
  1. Tags/

Leetcode

2021

2020年终总结

本来不知道写什么所以不打算写了,不过后来觉得可以把今年做的一些重大的决定写出来,把当时的分析和想法记录下来。这样若干年后再回看,就能找到,是哪些明智或愚蠢的决定,对人生产生了巨大的影响。

2017

leetcode 228. Summary Ranges

·1 min
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 min
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.