2016年8月31日

【LeetCode】350. Intersection of Two Arrays II 解题小结

摘要: 题目: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. 相比较I,这个题目允许答案 阅读全文

posted @ 2016-08-31 05:38 医生工程师 阅读(134) 评论(0) 推荐(0) 编辑

【LeetCode】136. Single Number 解题小结

摘要: 题目: Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime com 阅读全文

posted @ 2016-08-31 04:59 医生工程师 阅读(136) 评论(0) 推荐(0) 编辑

2016年8月30日

【LeetCode】 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], return [2]. 第一次做的时候先将nums1存储 阅读全文

posted @ 2016-08-30 23:33 医生工程师 阅读(422) 评论(0) 推荐(0) 编辑

2016年8月29日

【LeetCode】205. Isomorphic Strings 解题小结

摘要: 题目:Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurr 阅读全文

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

【LeetCode】3. Longest Substring Without Repeating Characters

摘要: 题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the 阅读全文

posted @ 2016-08-29 01:01 医生工程师 阅读(105) 评论(0) 推荐(0) 编辑

2016年8月28日

【LeetCode】2. Add Two Numbers 解题小结

摘要: 题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sin 阅读全文

posted @ 2016-08-28 14:12 医生工程师 阅读(113) 评论(0) 推荐(0) 编辑

【LeetCode】18. 4Sum 解题小结

摘要: 题目: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array 阅读全文

posted @ 2016-08-28 11:50 医生工程师 阅读(1187) 评论(0) 推荐(0) 编辑

【LeetCode】 16. 3Sum Closest 解题小结

摘要: 题目:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three intege 阅读全文

posted @ 2016-08-28 09:58 医生工程师 阅读(157) 评论(0) 推荐(0) 编辑

2016年8月27日

【LeeCode】 15. 3Sum 解题小结

摘要: 题目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum 阅读全文

posted @ 2016-08-27 22:40 医生工程师 阅读(142) 评论(0) 推荐(0) 编辑

【LeetCode】11. Container With Most Water 解题小结

摘要: 题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e 阅读全文

posted @ 2016-08-27 15:34 医生工程师 阅读(168) 评论(0) 推荐(0) 编辑

导航