一直对书和各种介绍不太满意, 终于看到一篇比较好的了,迅速转载.首先要推荐一下:http://www.alidata.org/archives/1470阿里的大牛在上面的文章中比较详细的介绍了shuffle过程中mapper和reduce的每个过程,强烈推荐先读一下。不过,上文没有写明一些实现的细节...
分类:
其他 时间:
2014-09-13 20:06:15
收藏:
0 评论:
0 赞:
0 阅读:
284
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他 时间:
2014-09-13 20:05:35
收藏:
0 评论:
0 赞:
0 阅读:
296
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他 时间:
2014-09-13 20:05:25
收藏:
0 评论:
0 赞:
0 阅读:
217
Sort a linked list using insertion sort. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *nex...
分类:
其他 时间:
2014-09-13 20:05:15
收藏:
0 评论:
0 赞:
0 阅读:
268
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask...
分类:
其他 时间:
2014-09-13 20:05:05
收藏:
0 评论:
0 赞:
0 阅读:
301
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他 时间:
2014-09-13 20:04:45
收藏:
0 评论:
0 赞:
0 阅读:
292
void OnCollisionEnter(Collision ctl) { ContactPoint contact = ctl.contacts[0]; Quaternion rot = Quaternion.FromT...
分类:
其他 时间:
2014-09-13 20:04:35
收藏:
0 评论:
0 赞:
0 阅读:
665
一:简单工厂 最初学习的一个运用简单工厂的例子是做一个计算器: 首先是接口public interface Cal {public double Calcu(double num1,double num2);}然后是加减乘除类实现计算接口:public class Add implements Ca...
分类:
数据库技术 时间:
2014-09-13 20:04:25
收藏:
0 评论:
0 赞:
0 阅读:
317
K近邻很简单。简而言之,对于未知类的样本,按照某种计算距离找出它在训练集中的k个最近邻,如果k个近邻中多数样本属于哪个类别,就将它判决为那一个类别。由于采用k投票机制,所以能够减小噪声的影响。由于KNN方法主要靠周围有限的邻近的样本,而不是靠判别类域的方法来确定所属类别的,因此对于类域的交叉或重叠较...
分类:
其他 时间:
2014-09-13 20:04:05
收藏:
0 评论:
0 赞:
0 阅读:
372
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space? 1 ...
分类:
其他 时间:
2014-09-13 20:03:55
收藏:
0 评论:
0 赞:
0 阅读:
262
poj1816:http://poj.org/problem?id=1816题意:给你n个模板串,然后每个串除了字母,还有?或者*,?可以代替任何非空单个字符,*可以替代任何长度任何串,包括空字符串。现在给以一些串,问你这些串在哪些串中出现过。题解:trie+DFS。首先,把n个字符串放到trie中...
分类:
其他 时间:
2014-09-13 20:03:45
收藏:
0 评论:
0 赞:
0 阅读:
307
XML: Activity:public class ShareActivity extends Activity implements OnClickListener {@Overrideprotected void onCreate(Bundle savedInstanceSta...
分类:
其他 时间:
2014-09-13 20:03:35
收藏:
0 评论:
0 赞:
0 阅读:
288
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 1 /** 2 ...
分类:
其他 时间:
2014-09-13 20:03:15
收藏:
0 评论:
0 赞:
0 阅读:
217
分类:
移动平台 时间:
2014-09-13 20:02:55
收藏:
0 评论:
0 赞:
0 阅读:
286
问题描述:一个结构体数组中存放的是学生的记录,每条记录包括:学号、姓名、成绩。该结构体数组中的内容如下表所示。 学生记录 --------------------------------------------- 学号 | 姓名 | 成绩 -------------------------...
分类:
其他 时间:
2014-09-13 20:02:45
收藏:
0 评论:
0 赞:
0 阅读:
282
1 定义2 直观解释信息熵用来衡量信息量的大小若不确定性越大,则信息量越大,熵越大若不确定性越小,则信息量越小,熵越小比如A班对B班,胜率一个为x,另一个为1-x则信息熵为 -(xlogx + (1-x)log(1-x))求导后容易证明x=1/2时取得最大,最大值为2也就是说两者势均力敌时,不确定性...
分类:
其他 时间:
2014-09-13 20:02:35
收藏:
0 评论:
0 赞:
0 阅读:
274
分类:
其他 时间:
2014-09-13 20:02:25
收藏:
0 评论:
0 赞:
0 阅读:
265
已经确定了的。。。B Rotate 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:B 5 */ 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std;12 13 st...
分类:
其他 时间:
2014-09-13 20:02:15
收藏:
0 评论:
0 赞:
0 阅读:
292
分类:
其他 时间:
2014-09-13 20:01:45
收藏:
0 评论:
0 赞:
0 阅读:
283
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他 时间:
2014-09-13 20:01:35
收藏:
0 评论:
0 赞:
0 阅读:
238