2.2 数字、字符与向量2.2.1 向量1.向量的赋值x3z3)any(c(1,2,3,4,5,6,7)>3)2.2.4 缺失数据z0]->x;xy=0]=0]x<- -10:10plot(x,y)2.下标的正整数运算v<- 10:20v[c(1,3,5,9)]v[1:5]v[c(1,2,3,2,1... ...
分类:
其他好文 时间:
2018-03-01 21:36:45
阅读次数:
183
No. Title Level Rate 1 Two Sum Medium 17.70% 2 Add Two Numbers Medium 21.10% 3 Longest Substring Without Repeating Characters Medium 20.60% 4 Median o... ...
分类:
其他好文 时间:
2018-02-27 10:20:26
阅读次数:
240
Define the simple skewness of a collection of numbers to be the collection's mean minus its median. You are given a list of n (not necessarily distinc ...
分类:
其他好文 时间:
2018-02-22 00:40:23
阅读次数:
197
Running Median Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2024 Accepted: 972 Description For this problem, you will write a program th ...
分类:
其他好文 时间:
2018-02-17 21:44:41
阅读次数:
251
先是把昨天没看完的红黑树给看了,红黑树本身还挺复杂的,光头哥讲的就比较浅,就把红黑树的作用以及红黑规则的证明给讲了下。红黑树就是符合一种规则的树,这种树的好处就是它的高度可以确保是对数级的。证明也不算难。难点在于insert,delete这些操作,光头哥就讲了一点点,我也没咋细看。。。 然后是作业, ...
分类:
其他好文 时间:
2018-02-16 10:17:15
阅读次数:
182
目录 1 pandas基本概念1.1 pandas数据结构剖析1.1.1 Series1.1.2 DataFrame1.1.3 索引1.1.4 pandas基本操作1. ...
分类:
其他好文 时间:
2018-02-12 20:03:26
阅读次数:
3170
题目:http://poj.org/problem?id=3784 将较小的数放入大根堆,较大的数放入小根堆,控制较小数堆大小比较大数堆小1,则较大数堆堆顶即为中位数。 代码如下: ...
分类:
其他好文 时间:
2018-02-11 00:06:54
阅读次数:
180
Median of Two Sorted Arrays 题解 题目来源:https://leetcode.com/problems/median of two sorted arrays/description/ Description There are two sorted arrays num ...
分类:
其他好文 时间:
2018-01-21 21:34:47
阅读次数:
205
[抄题]: 数字是不断进入数组的,在每次添加一个新的数进入数组的同时返回当前新数组的中位数。 [思维问题]: [一句话思路]: 如果maxHeap.peek() > minHeap.peek(),就不断流动,直到顺滑。 [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法 ...
分类:
其他好文 时间:
2018-01-19 00:20:41
阅读次数:
147
1. leetcode.4 Median of Two Sorted Arrays 找两个有序数列的中位数。要求log(m+n)。 二分,从b中找a.middle,计算小于等于a.middle的数的个数left。 ...
分类:
其他好文 时间:
2018-01-18 23:09:06
阅读次数:
201