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) 编辑

【LeetCode】81. Search in Rotated Sorted Array II

摘要: 题目: Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a fun 阅读全文

posted @ 2016-08-27 14:50 医生工程师 阅读(126) 评论(0) 推荐(0) 编辑

【LeetCode】33. Search in Rotated Sorted Array 解题小结

摘要: 题目: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a targe 阅读全文

posted @ 2016-08-27 10:43 医生工程师 阅读(129) 评论(0) 推荐(0) 编辑

【LeetCode】217. Contains Duplicate 解题小结

摘要: 题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the 阅读全文

posted @ 2016-08-27 10:24 医生工程师 阅读(111) 评论(0) 推荐(0) 编辑

导航