自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MissZhou要努力

路漫漫其修远兮,吾将上下而求索

  • 博客(7)
  • 收藏
  • 关注

原创 lintcode532. 逆序对/剑指offer【归并排序】

https://www.lintcode.com/problem/reverse-pairs/descriptionhttps://www.nowcoder.com/practice/96bd6684e04a44eb80e6a68efc0ec6c5?tpId=13&tqId=11188&tPage=1&rp=1&ru=/ta/coding-interviews&...

2019-08-25 23:44:07 223

原创 lintcode 382. 三角形计数【双指针】

https://www.lintcode.com/problem/triangle-count/description描述中文English给定一个整数数组,在该数组中,寻找三个数,分别代表三角形三条边的长度,问,可以寻找到多少组这样的三个数来组成三角形?您在真实的面试中是否遇到过这个题?是题目纠错样例样例 1:输入: [3, 4, 6, 7]输出: 3解...

2019-08-25 19:59:16 285

原创 leetcode 买卖股票【六题集合】

121.Best Time to Buy and Sell StockSay 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 (i.e., buy...

2019-08-25 00:53:30 403

原创 lintcode 81. 数据流中位数[heap]

描述中文English数字是不断进入数组的,在每次添加一个新的数进入数组的同时返回当前新数组的中位数。您在真实的面试中是否遇到过这个题?是题目纠错说明中位数的定义:这里的中位数不等同于数学定义里的中位数。 中位数是排序后数组的中间值,如果有数组中有n个数,则中位数为A[(n-1)/2]A[(n−1)/2]。 比如:数组A=[1,2,3]的中位数是2,数组A=[1...

2019-08-21 22:20:13 250

原创 leetcode 215. Kth Largest Element in an Array

简直不懂为啥一个练手的题 能卡这么久Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Example 1:Input: [3,2,1,5,6,4] and...

2019-08-20 00:42:02 147

原创 leetcode 11. Container With Most Water& lintcode 363. 接雨水

愚蠢如我这两个其实还不太一样的和这个http://acm.hdu.edu.cn/showproblem.php?pid=1506更不一样(后者是单调栈)https://www.lintcode.com/problem/trapping-rain-water/description由于图是酱婶的,所以需要一位一位的算class Solution {public: ...

2019-08-18 12:58:08 186

原创 lintcode 178. 图是否是树【并查集】

昨晚迷迷糊糊写的忘记了树的条件是不成环,今天捡起来debug半天才发现最后比较的不应该是父节点相同 而应该是根结点相同其实最明智的做法是判断给出的边数,如果之前没成环,边数=n-1,那么就是树!class Solution {public: /** * @param n: An integer * @param edges: a list o...

2019-08-08 20:38:45 354

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除