2015年4月17日

摘要: 题目:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should ... 阅读全文
posted @ 2015-04-17 18:56 承续缘 阅读(138) 评论(0) 推荐(0) 编辑

2015年4月15日

摘要: 题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target valu... 阅读全文
posted @ 2015-04-15 22:51 承续缘 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ... 阅读全文
posted @ 2015-04-15 08:57 承续缘 阅读(168) 评论(0) 推荐(0) 编辑

2015年4月13日

摘要: 题目:https://leetcode.com/problems/remove-duplicates-from-sorted-array/Given a sorted array, remove the duplicates in place such that each element appea... 阅读全文
posted @ 2015-04-13 22:26 承续缘 阅读(201) 评论(0) 推荐(0) 编辑
摘要: RT今天开刷,入cpp的坑 阅读全文
posted @ 2015-04-13 21:47 承续缘 阅读(282) 评论(0) 推荐(0) 编辑

2015年3月1日

摘要: 题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2015-03-01 23:59 承续缘 阅读(197) 评论(0) 推荐(0) 编辑

2015年2月1日

摘要: 题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2015-02-01 10:37 承续缘 阅读(232) 评论(0) 推荐(0) 编辑

2015年1月31日

摘要: 思路:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction ... 阅读全文
posted @ 2015-01-31 21:34 承续缘 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ... 阅读全文
posted @ 2015-01-31 20:36 承续缘 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a s... 阅读全文
posted @ 2015-01-31 14:37 承续缘 阅读(188) 评论(0) 推荐(0) 编辑

导航