![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
一只吃猫的鱼
这个作者很懒,什么都没留下…
展开
-
leetcode-26
题目Given a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another array, you must do this in place原创 2017-07-13 10:03:57 · 166 阅读 · 0 评论 -
leetcode-283
Move Zeroes 题目Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], a原创 2017-07-17 14:10:24 · 726 阅读 · 0 评论 -
leetcode-1
Two Sum 题目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 exactly one solution, and you may n原创 2017-07-17 13:28:37 · 213 阅读 · 0 评论 -
leetcode-122
Best Time to Buy and Sell Stock II 题目Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete as原创 2017-07-17 10:08:08 · 374 阅读 · 0 评论 -
leetcode-121
Best Time to Buy and Sell Stock题目Say you have an array for which the ith element is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie, buy原创 2017-07-14 17:18:29 · 194 阅读 · 0 评论 -
leetcode-88
Merge Sorted Array 题目Given two sorted integer arrays nums1 and nums2, merge nums2 intonums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equ原创 2017-07-14 10:10:54 · 336 阅读 · 0 评论 -
leetcode-53
Maximum Subarray题目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,1,-5,4],the contiguou原创 2017-07-13 13:39:45 · 186 阅读 · 0 评论 -
leetcode-35
Search Insert Position 题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assum原创 2017-07-13 11:02:51 · 157 阅读 · 0 评论 -
leetcode-27
Remove Element 题目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 must do this in place wi原创 2017-07-13 10:32:31 · 116 阅读 · 0 评论 -
leetcode-268
Missing Number题目Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.Note:Yo原创 2017-07-17 15:50:37 · 199 阅读 · 0 评论