证明:(1)我们可知球心所组成的点列$\left\{ {{x_n}} \right\}_{n = 1}^\infty $是基本列.事实上,当$m \ge n$时,由$x \in {B_m} \subset {B_n}$得\[d\left( {{x_m},{x_n}} \right) \le {\va...
分类:
其他好文 时间:
2014-07-07 20:40:30
阅读次数:
145
二叉树的前序遍历:root点先被访问,然后是left和right子节点。迭代的版本也相对好写。1、递归版本:时间复杂度O(N),空间复杂度O(N) 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int va...
分类:
其他好文 时间:
2014-07-07 20:35:24
阅读次数:
158
二叉树的中序遍历1、递归版本/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) :...
分类:
其他好文 时间:
2014-07-07 20:00:20
阅读次数:
161
linq to Entity Framework 中left join 的使用,Linq 中使用Into 语句和不使用Into 语句的区别, Linq DefaultIfEmpty 函数的作用
分类:
其他好文 时间:
2014-07-07 19:31:23
阅读次数:
296
二叉树的后续遍历1、递归版本/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) :...
分类:
其他好文 时间:
2014-06-30 14:17:28
阅读次数:
306
jquery 判断用户是鼠标是右击还是左击,// 1 = 鼠标左键 left; 2 = 鼠标中键; 3 = 鼠标右键$(document).mousedown(function(e) { if(3 == e.which){ alert('这 是右键单击事件'); }...
分类:
编程语言 时间:
2014-06-30 11:53:46
阅读次数:
194
题目
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down...
分类:
其他好文 时间:
2014-06-30 11:10:34
阅读次数:
211
题目
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approa...
分类:
其他好文 时间:
2014-06-29 23:44:02
阅读次数:
357
前言
在做需求时,经常遇到多个目录,也就是多个维度进行join,这里分析一下,数据是怎么流动的。
1、多目录输入
使用MultipleInputs.addInputPath() 对多目录制定格式和map
2、数据流分析
map按行读入数据,需要对不同的输入目录,打上不同的标记(这个方法又叫reduce端连接),map在输出后会进行partition和sort,按照key进行排序,然后输...
分类:
其他好文 时间:
2014-06-29 23:09:07
阅读次数:
348
在做机房收费系统中,涉及到多张表的查询时,用到了join,感觉很不错,学习了下join,顺便复习了下高中数学。
现在,用机房收费系统中学生信息表和学生上机表做个小DEMO~ ,如图:
表A:学生信息表:
表B:学生上机表:...
分类:
其他好文 时间:
2014-06-29 20:43:24
阅读次数:
210