- 博客(3)
- 收藏
- 关注
原创 LeetCode.Rotate Array 旋转数组
Given an array, rotate the array to the right by k steps, where k is non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the right: [7,1,2...
2018-11-18 23:27:41 129
原创 LeetCode.Best Time to Buy and Sell Stock II 买卖股票的最佳时机 II
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one...
2018-11-16 15:21:35 124
原创 LeetCode. Remove Duplicates from Sorted Array 从排序数组中删除重复项
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifyin...
2018-11-13 17:07:27 78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人