摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
摘要:
Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you 阅读全文
摘要:
In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as 阅读全文
摘要:
Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Example 2: Note: Length of th 阅读全文
摘要:
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 阅读全文
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 这道题还是比较简单的,直接贴代码吧:) 阅读全文
摘要:
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Example 2 Note:Your al 阅读全文
摘要:
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
摘要:
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文