摘要:
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. Example: 原题地址: Pa 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. Example: 原题地址: Pascal's Triangle 难度: Easy 题意: 杨辉三角 时间复杂度: O(n) 阅读全文
摘要:
Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: 题目地址: Longest Continuous Incr 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Note: 原题地址: Maximum Product of Three Numbers 难度: E 阅读全文
摘要:
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 阅读全文
摘要:
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 题意 阅读全文