2016年8月23日

【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 阅读全文

posted @ 2016-08-23 16:39 医生工程师 阅读(277) 评论(0) 推荐(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, y 阅读全文

posted @ 2016-08-23 15:53 医生工程师 阅读(94) 评论(0) 推荐(0) 编辑

【LeetCode】169. Majority Element 解题小结

摘要: 题目:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that 阅读全文

posted @ 2016-08-23 13:26 医生工程师 阅读(120) 评论(0) 推荐(0) 编辑

【LeetCode】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 significant digit i 阅读全文

posted @ 2016-08-23 09:51 医生工程师 阅读(108) 评论(0) 推荐(0) 编辑

【LeetCode】Contains Duplicate II 解题小结

摘要: 题目:Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and t 阅读全文

posted @ 2016-08-23 03:35 医生工程师 阅读(701) 评论(0) 推荐(0) 编辑

导航