摘要:
#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 阅读全文
posted @ 2016-11-21 17:11
冯兴伟
阅读(181)
评论(0)
推荐(0)
摘要:
#66. Plus One Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most signific 阅读全文
posted @ 2016-11-21 16:59
冯兴伟
阅读(174)
评论(0)
推荐(0)
摘要:
#88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 h 阅读全文
posted @ 2016-11-21 16:39
冯兴伟
阅读(127)
评论(0)
推荐(0)
摘要:
#189. Rotate Array Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [ 阅读全文
posted @ 2016-11-21 15:45
冯兴伟
阅读(903)
评论(0)
推荐(0)
摘要:
#217. Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears 阅读全文
posted @ 2016-11-21 14:54
冯兴伟
阅读(143)
评论(0)
推荐(0)
摘要:
#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 阅读全文
posted @ 2016-11-21 14:40
冯兴伟
阅读(96)
评论(0)
推荐(0)
摘要:
#203. Remove Linked List Elements Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 阅读全文
posted @ 2016-11-21 14:30
冯兴伟
阅读(143)
评论(0)
推荐(0)
摘要:
#237. Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Suppos 阅读全文
posted @ 2016-11-21 13:46
冯兴伟
阅读(163)
评论(0)
推荐(0)
摘要:
#414. Third Maximum Number Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximu 阅读全文
posted @ 2016-11-21 01:58
冯兴伟
阅读(829)
评论(0)
推荐(0)
摘要:
#344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 题解:回文串 阅读全文
posted @ 2016-11-21 00:26
冯兴伟
阅读(144)
评论(0)
推荐(0)
摘要:
#349. Intersection of Two Arrays Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2] 阅读全文
posted @ 2016-11-21 00:14
冯兴伟
阅读(273)
评论(0)
推荐(0)