摘要: 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 阅读全文
posted @ 2018-03-20 22:10 还是说得清点吧 阅读(150) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2018-03-20 21:54 还是说得清点吧 阅读(135) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Example 2: Note: Length of th 阅读全文
posted @ 2018-03-20 21:33 还是说得清点吧 阅读(129) 评论(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-03-20 20:56 还是说得清点吧 阅读(87) 评论(0) 推荐(0)
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 这道题还是比较简单的,直接贴代码吧:) 阅读全文
posted @ 2018-03-20 20:21 还是说得清点吧 阅读(119) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2018-03-20 20:05 还是说得清点吧 阅读(764) 评论(0) 推荐(0)