摘要:
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Inpu 阅读全文
posted @ 2018-09-30 22:02
静静地挖坑
阅读(287)
评论(0)
推荐(0)
摘要:
Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-09-30 18:41
静静地挖坑
阅读(137)
评论(0)
推荐(0)
摘要:
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. Example: 原题地址: Pascal's Triangle 难度: Easy 题意: 杨辉三角 时间复杂度: O(n) 阅读全文
posted @ 2018-09-30 18:27
静静地挖坑
阅读(111)
评论(0)
推荐(0)
摘要:
Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: 题目地址: Longest Continuous Incr 阅读全文
posted @ 2018-09-30 18:10
静静地挖坑
阅读(130)
评论(0)
推荐(0)
摘要:
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y 阅读全文
posted @ 2018-09-30 17:48
静静地挖坑
阅读(335)
评论(0)
推荐(0)
摘要:
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2018-09-30 12:38
静静地挖坑
阅读(150)
评论(0)
推荐(0)
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Note: 原题地址: Maximum Product of Three Numbers 难度: E 阅读全文
posted @ 2018-09-30 11:57
静静地挖坑
阅读(134)
评论(0)
推荐(0)
摘要:
In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abbxxxxzyy" has the g 阅读全文
posted @ 2018-09-30 11:34
静静地挖坑
阅读(173)
评论(0)
推荐(0)
摘要:
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. 原题地址: Missing Number 难度: Easy 题意 阅读全文
posted @ 2018-09-30 11:00
静静地挖坑
阅读(108)
评论(0)
推荐(0)
摘要:
Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave 阅读全文
posted @ 2018-09-30 00:14
静静地挖坑
阅读(123)
评论(0)
推荐(0)

浙公网安备 33010602011771号