![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
cuiccc2014
程序猿
展开
-
【LeetCode.287】Find the Duplicate Number(寻找重复数 | medium)
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one. Example 1: Input: [1,3,4,2,2] Ou原创 2020-07-20 22:39:15 · 137 阅读 · 0 评论 -
【LeetCode.134】Gas Station(加油站 | medium)
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empty原创 2020-07-20 15:10:34 · 139 阅读 · 0 评论 -
【LeetCode.1324】Print Words Vertically(竖直打印单词 | medium)
Q:Given a string s.Returnall the words vertically in the same order in which they appear in s. Words are returned as a list of strings, complete withspaces when is necessary. (Trailing spaces are not allowed). Each word would be put on only one column a...原创 2020-07-20 14:00:30 · 310 阅读 · 0 评论 -
【LeetCode.53】Maximum Subarray(最大子序和 | 动态规划)
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanati...原创 2018-09-03 02:23:53 · 170 阅读 · 0 评论